[add]: DB_URI #60

Closed
vivian.d.simbrellang.com wants to merge 5 commits from health_check into master
Showing only changes of commit dd0f39428a - Show all commits
+2 -1
View File
@@ -122,7 +122,7 @@ def notification_callback():
# Health Check Endpoint
@api.route("/health", methods=["GET"])
def health_check():
SQLALCHEMY_DATABASE_URI = settings.SQLALCHEMY_DATABASE_URI
response = {}
db_status = "Connection Successful"
events_service_status = "Connection Successful"
@@ -139,6 +139,7 @@ def health_check():
# Check database connection
try:
logger.info(f"Database Health == : {SQLALCHEMY_DATABASE_URI}")
db.session.execute(text("SELECT 1"))
except Exception as e:
db_status = "Connection Failed"