Parcourir la source

Wups. No point in the PeriodicWorkController to check all the time (took 50% CPU). Now sleeps 1 seconds between checks.

Ask Solem il y a 16 ans
Parent
commit
83c6f53d3a
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  1. 1 0
      celery/worker.py

+ 1 - 0
celery/worker.py

@@ -258,6 +258,7 @@ class PeriodicWorkController(threading.Thread):
         """Don't use :meth:`run`. use :meth:`start`."""
         while True:
             default_periodic_status_backend.run_periodic_tasks()
+            time.sleep(1)
 
 
 class WorkController(object):