Merge pull request #305 from anujm/add_logging_for_rabbitmq
Added logging on RabbitMQ connection error and revival
This commit is contained in:
commit
1c7cbab784
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user