SQLALCHEMY_DATABASE_URI
This commit is contained in:
committed by
VivianDee
parent
50eaf0099b
commit
dd0f39428a
@@ -122,7 +122,7 @@ def notification_callback():
|
|||||||
# Health Check Endpoint
|
# Health Check Endpoint
|
||||||
@api.route("/health", methods=["GET"])
|
@api.route("/health", methods=["GET"])
|
||||||
def health_check():
|
def health_check():
|
||||||
|
SQLALCHEMY_DATABASE_URI = settings.SQLALCHEMY_DATABASE_URI
|
||||||
response = {}
|
response = {}
|
||||||
db_status = "Connection Successful"
|
db_status = "Connection Successful"
|
||||||
events_service_status = "Connection Successful"
|
events_service_status = "Connection Successful"
|
||||||
@@ -139,6 +139,7 @@ def health_check():
|
|||||||
|
|
||||||
# Check database connection
|
# Check database connection
|
||||||
try:
|
try:
|
||||||
|
logger.info(f"Database Health == : {SQLALCHEMY_DATABASE_URI}")
|
||||||
db.session.execute(text("SELECT 1"))
|
db.session.execute(text("SELECT 1"))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
db_status = "Connection Failed"
|
db_status = "Connection Failed"
|
||||||
|
|||||||
Reference in New Issue
Block a user