mirror of
https://github.com/FAUSheppy/atlantis-event-dispatcher
synced 2026-06-19 05:12:38 +02:00
Compare commits
2 Commits
f3903b3936
...
55cc4cfeef
| Author | SHA1 | Date | |
|---|---|---|---|
| 55cc4cfeef | |||
| b9a5e7f32f |
+8
-3
@@ -12,12 +12,13 @@ import yaml
|
||||
import ldaptools
|
||||
import messagetools
|
||||
|
||||
from sqlalchemy import Column, Integer, String, Boolean, or_, and_
|
||||
from sqlalchemy import Column, Integer, String, Boolean, or_, and_, text
|
||||
from sqlalchemy.orm import sessionmaker
|
||||
from sqlalchemy.exc import IntegrityError
|
||||
from sqlalchemy.exc import IntegrityError, SQLAlchemyError
|
||||
from sqlalchemy.sql import func
|
||||
import sqlalchemy
|
||||
from flask_sqlalchemy import SQLAlchemy
|
||||
|
||||
from sqlalchemy.sql.expression import func
|
||||
|
||||
OPENSEARCH_HEADER_SEPERATOR = ","
|
||||
@@ -429,7 +430,11 @@ def save_in_dispatch_queue(persons, title, message, method, link=""):
|
||||
@app.route("/health")
|
||||
def health():
|
||||
|
||||
return ("Not Iplemented, but at least it's running", 200)
|
||||
try:
|
||||
db.session.execute(text("SELECT 1"))
|
||||
return ({"status": "ok"}, 200)
|
||||
except Exception as e:
|
||||
return ({"status": "error", "message": str(e)}, 500)
|
||||
|
||||
def create_app():
|
||||
|
||||
|
||||
Reference in New Issue
Block a user