23 lines
449 B
Python
23 lines
449 B
Python
#!/usr/bin/env python3
|
|
from magic_amqp import magic_amqp
|
|
|
|
"""
|
|
Healthchek functions
|
|
"""
|
|
|
|
__author__ = "@tormakris"
|
|
__copyright__ = "Copyright 2020, Birbnetes Team"
|
|
__module_name__ = "healthchecks"
|
|
__version__text__ = "1"
|
|
|
|
|
|
def amqp_connection_status():
|
|
if magic_amqp.is_healthy():
|
|
result = True
|
|
text = "amqp connection is ok"
|
|
else:
|
|
result = False
|
|
text = "amqp connection is unhealthy"
|
|
|
|
return result, text
|