Merge pull request #305 from anujm/add_logging_for_rabbitmq

Added logging on RabbitMQ connection error and revival
This commit is contained in:
anujm 2014-03-13 20:26:17 +05:30
commit 1c7cbab784

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