Running a task after all tasks have been completed

后端 未结 4 2009
迷失自我
迷失自我 2020-12-29 09:21

I\'m writing an application which needs to run a series of tasks in parallel and then a single task with the results of all the tasks run:

@celery.task
def p         


        
4条回答
  •  遥遥无期
    2020-12-29 09:48

    Celery has plenty of tools for most of workflows you can imagine.

    It seems you need to get use of chord. Here's a quote from docs:

    A chord is just like a group but with a callback. A chord consists of a header group and a body, where the body is a task that should execute after all of the tasks in the header are complete.

提交回复
热议问题