Przeglądaj źródła

Documented PeriodicWorkController

Ask Solem 16 lat temu
rodzic
commit
bba7dd4db8
1 zmienionych plików z 10 dodań i 0 usunięć
  1. 10 0
      celery/worker.py

+ 10 - 0
celery/worker.py

@@ -244,8 +244,18 @@ class TaskWrapper(object):
 
 
 class PeriodicWorkController(threading.Thread):
+    """A thread that continuously checks if there are
+    :class:`celery.task.PeriodicTask`s waiting for execution, and executes
+    them.
+
+    Example
+
+        >>> PeriodicWorkController().start()
+    
+    """
 
     def run(self):
+        """Don't use :meth:`run`. use :meth:`start`."""
         while True:
             default_periodic_status_backend.run_periodic_tasks()