瀏覽代碼

FAQ: Added new Q/A: My Periodic Tasks won't run.

Ask Solem 16 年之前
父節點
當前提交
8eb2bdacae
共有 1 個文件被更改,包括 15 次插入0 次删除
  1. 15 0
      docs/faq.rst

+ 15 - 0
docs/faq.rst

@@ -33,6 +33,21 @@ I'm having ``IntegrityError: Duplicate Key`` errors. Why?
 **Answer:** See `MySQL is throwing deadlock errors, what can I do?`_.
 Thanks to howsthedotcom.
 
+My Periodic Tasks won't run
+----------------------------
+
+**Answer:** Did you register the task in the applications ``tasks.py`` module?
+(or in some other module Django loads by default, like ``models.py``?).
+
+You can find out if the celery daemon is able to run the task by executing the
+periodic task manually, by doing the following:
+
+    >>> from myapp.tasks import MyPeriodicTask
+    >>> MyPeriodicTask.delay()
+
+Watch celery daemons logfile (or output if not running as a daemon), to see
+if it's able to find the task, or if some other error is happening.
+
 Can I send some tasks to only some servers?
 --------------------------------------------