Added logging on RabbitMQ connection error and revival

This commit is contained in:
Anuj Mathur 2014-03-13 12:17:18 +05:30
parent 29d878d706
commit c2aa435869
1 changed files with 7 additions and 0 deletions

View File

@ -143,6 +143,13 @@ class Consumer(kombu.mixins.ConsumerMixin):
self.should_stop = True
shutdown_soon = True
def on_connection_revived(self):
_get_child_logger().debug("The connection to RabbitMQ was revived.")
def on_connection_error(self, exc, interval):
_get_child_logger().error("RabbitMQ Broker connection error: %r. "
"Trying again in %s seconds.", exc, interval)
def continue_running():
return not shutdown_soon