Added amqp to health check
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from db import db
|
||||
from magic_ampq import magic_ampq
|
||||
|
||||
"""
|
||||
Healthchek functions
|
||||
@@ -21,3 +22,14 @@ def health_database_status():
|
||||
output = str(e)
|
||||
is_database_working = False
|
||||
return is_database_working, output
|
||||
|
||||
|
||||
def ampq_connection_status():
|
||||
if magic_ampq.is_healthy():
|
||||
result = True
|
||||
text = "ampq connection is ok"
|
||||
else:
|
||||
result = False
|
||||
text = "ampq connection is unhealthy"
|
||||
|
||||
return result, text
|
||||
|
||||
Reference in New Issue
Block a user