Explorar o código

Mediator: Don't sleep between blocking queue.get()'s

Ask Solem %!s(int64=14) %!d(string=hai) anos
pai
achega
89502dbd05
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      celery/worker/controllers.py

+ 1 - 1
celery/worker/controllers.py

@@ -89,7 +89,7 @@ class Mediator(BackgroundThread):
             # This blocks until there's a message in the queue.
             task = self.ready_queue.get(timeout=1)
         except QueueEmpty:
-            time.sleep(0.2)
+            pass
         else:
             if task.revoked():
                 return