mirror of
https://github.com/FAUSheppy/atlantis-event-dispatcher
synced 2026-06-19 05:12:38 +02:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 55cc4cfeef | |||
| b9a5e7f32f |
+8
-3
@@ -12,12 +12,13 @@ import yaml
|
|||||||
import ldaptools
|
import ldaptools
|
||||||
import messagetools
|
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.orm import sessionmaker
|
||||||
from sqlalchemy.exc import IntegrityError
|
from sqlalchemy.exc import IntegrityError, SQLAlchemyError
|
||||||
from sqlalchemy.sql import func
|
from sqlalchemy.sql import func
|
||||||
import sqlalchemy
|
import sqlalchemy
|
||||||
from flask_sqlalchemy import SQLAlchemy
|
from flask_sqlalchemy import SQLAlchemy
|
||||||
|
|
||||||
from sqlalchemy.sql.expression import func
|
from sqlalchemy.sql.expression import func
|
||||||
|
|
||||||
OPENSEARCH_HEADER_SEPERATOR = ","
|
OPENSEARCH_HEADER_SEPERATOR = ","
|
||||||
@@ -429,7 +430,11 @@ def save_in_dispatch_queue(persons, title, message, method, link=""):
|
|||||||
@app.route("/health")
|
@app.route("/health")
|
||||||
def 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():
|
def create_app():
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user