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:
@ -90,6 +90,13 @@ class MagicAMPQ:
|
||||
if tries > 10:
|
||||
time.sleep(2)
|
||||
|
||||
def is_healthy(self) -> bool:
|
||||
with self._lock:
|
||||
if not self._pika_channel:
|
||||
return False
|
||||
|
||||
return self._pika_channel.is_open and self._pika_connection.is_open
|
||||
|
||||
|
||||
# instance to be used in the flask app
|
||||
magic_ampq = MagicAMPQ()
|
||||
|
Reference in New Issue
Block a user