Forráskód Böngészése

Updated Chord important notes to call out that results must not be ignored when using chords

Adam Venturella 12 éve
szülő
commit
152b979786
1 módosított fájl, 24 hozzáadás és 0 törlés
  1. 24 0
      docs/userguide/canvas.rst

+ 24 - 0
docs/userguide/canvas.rst

@@ -727,6 +727,30 @@ for other tasks <task-synchronous-subtasks>`)
 Important Notes
 ~~~~~~~~~~~~~~~
 
+Tasks used within a chord must *not* ignore their results. In practice this
+means that you must enable a :const:`CELERY_RESULT_BACKEND` in order to use
+chords. Additionally, if :const:`CELERY_IGNORE_RESULT` is set to :const:`True`
+in your configuration, be sure that the individual tasks to be used within
+the chord are defined with :const:`ignore_result=False`. This applies to both
+Task subclasses and decorated tasks.
+
+Example Task subclass:
+
+.. code-block:: python
+
+    class MyTask(Task):
+        abstract = True
+        ignore_result = False
+
+
+Example decorated task:
+
+.. code-block:: python
+
+    @celery.task(ignore_result=False)
+    def another_task(project):
+        do_something()
+
 By default the synchronization step is implemented by having a recurring task
 poll the completion of the taskset every second, calling the subtask when
 ready.