forked from DigiFi/digifi-BankToProductCore
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
|
||||
@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"
|
||||
|
||||
Reference in New Issue
Block a user