I have a task task_main
which calls other tasks. But I need them to execute in a specific order.
Celery docs say not to call them one after another with .delay()
and get()
.
http://docs.celeryproject.org/en/latest/userguide/tasks.html#avoid-launching-synchronous-subtasks
Will using chain run them in order? I cannot find this in the docs.
@shared_task
def task_a():
pass
@shared_task
def task_b():
pass
@shared_task
def task_b():
pass
@shared_task
def task_main():
chain = task_a.s() | task_b.s() | task_c.s()
chain()