Explorar o código

Recent change made celeryd use 100% CPU

Need to find a better way to do this, maybe using threading.Event
Ask Solem %!s(int64=15) %!d(string=hai) anos
pai
achega
7965ad9d66
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:
-            pass
+            time.sleep(0.2)
         else:
             if task.revoked():
                 return