Exemplo n.º 1
0
 def on_close(self):
     # Clear internal queues to get rid of old messages.
     # They can't be acked anyway, as a delivery tag is specific
     # to the current channel.
     if self.controller and self.controller.semaphore:
         self.controller.semaphore.clear()
     if self.timer:
         self.timer.clear()
     reserved_requests.clear()
     if self.pool and self.pool.flush:
         self.pool.flush()
Exemplo n.º 2
0
 def on_close(self):
     # Clear internal queues to get rid of old messages.
     # They can't be acked anyway, as a delivery tag is specific
     # to the current channel.
     if self.controller and self.controller.semaphore:
         self.controller.semaphore.clear()
     if self.timer:
         self.timer.clear()
     for bucket in values(self.task_buckets):
         if bucket:
             bucket.clear_pending()
     reserved_requests.clear()
     if self.pool and self.pool.flush:
         self.pool.flush()