Skip to content

Commit

Permalink
Update celery docs
Browse files Browse the repository at this point in the history
  • Loading branch information
omidraha committed Dec 17, 2018
1 parent cfb3ff2 commit 3238e9d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/python/celery.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,21 @@ http://stackoverflow.com/a/36977126

http://docs.celeryproject.org/en/latest/userguide/canvas.html#signatures


Chain tasks on celery
---------------------



.. code-block:: bash
t1 = my_task_01.subtask((arg1,), immutable=True)
t2 = my_task_02.subtask((arg1, arg2), immutable=True)
t3 = my_task_01.subtask((arg1,), immutable=True)
task_list = [t1, t2, t3]
tasks = chain(task_list)
tasks.apply_async()
The next task will run, if previous task run successfully.
The `immutable` option is set to `True`, so the result of each task won't send to the next task.

0 comments on commit 3238e9d

Please sign in to comment.