forked from DigiFi/digifi-BankToProductCore
[fix]: status
This commit is contained in:
@@ -121,9 +121,10 @@ def notification_callback():
|
||||
def health_check():
|
||||
|
||||
|
||||
response = {"status": "ok"}
|
||||
response = {}
|
||||
db_status = "Connect Successful"
|
||||
error = None
|
||||
status = "ok"
|
||||
|
||||
try:
|
||||
# Simple query to validate DB connection
|
||||
@@ -131,7 +132,9 @@ def health_check():
|
||||
except Exception as e:
|
||||
db_status = "Connection Failed"
|
||||
error = str(e)
|
||||
status = "failed"
|
||||
|
||||
response["status"] = status
|
||||
response["db_status"] = db_status
|
||||
if error:
|
||||
response["error"] = error
|
||||
|
||||
Reference in New Issue
Block a user