[add]: DB URI #61

Merged
ameye merged 1 commits from add_db_uri into master 2025-10-10 16:52:35 +00:00
+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
}