|
@@ -162,6 +162,9 @@ class CarrotListener(object):
|
|
|
message.ack()
|
|
|
|
|
|
def close_connection(self):
|
|
|
+ self.logger.debug("CarrotListener: "
|
|
|
+ "Closing consumer channel...")
|
|
|
+ self.task_consumer = self.task_consumer and self.task_consumer.close()
|
|
|
self.logger.debug("CarrotListener: "
|
|
|
"Closing connection to broker...")
|
|
|
self.connection = self.connection and self.connection.close()
|
|
@@ -175,8 +178,9 @@ class CarrotListener(object):
|
|
|
self.logger.debug("Heart: Going into cardiac arrest...")
|
|
|
self.heart = self.heart.stop()
|
|
|
|
|
|
- self.logger.debug("TaskConsumer: Shutting down...")
|
|
|
- self.task_consumer = self.task_consumer and self.task_consumer.close()
|
|
|
+ self.logger.debug("TaskConsumer: Cancelling consumers...")
|
|
|
+ if self.task_consumer:
|
|
|
+ self.task_consumer.cancel()
|
|
|
|
|
|
if self.event_dispatcher:
|
|
|
self.logger.debug("EventDispatcher: Shutting down...")
|