コード例 #1
0
ファイル: consumer.py プロジェクト: AlJohri/celery
 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()
コード例 #2
0
ファイル: consumer.py プロジェクト: xpxu/celery
 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()