[add]: DB URI

This commit was merged in pull request #61.
This commit is contained in:
VivianDee
2025-10-10 16:21:28 +01:00
parent 4da0b8c716
commit 9da259900c
+10 -1
View File
@@ -118,7 +118,6 @@ def notification_callback():
response = NotificationCallbackService.process_request(data)
return response
# Health Check Endpoint
@api.route("/health", methods=["GET"])
def health_check():
@@ -129,6 +128,15 @@ def health_check():
errors = []
status = "ok"
# Extract the database URI
try:
db_uri = db.engine.url.render_as_string(hide_password=False)
db_uri = db_uri
except Exception as e:
db_uri = "Unavailable"
# Check database connection
try:
logger.info(f"Database Health == : {SQLALCHEMY_DATABASE_URI}")
@@ -159,6 +167,7 @@ def health_check():
"status": status,
"db_status": db_status,
"events_service_status": events_service_status,
"db_uri": db_uri,
"errors": errors or None
}