3

I am new to Celery. I would like to chain two groups of tasks, where all tasks in a group run async and the second group is processed only after all tasks in the first group are done. I do not need to return results for any of the tasks.

I have tried

g1 = group([task1.si(1), tasks1.si(2)])
g2 = group([task2.si(3), tasks2.si(4)])
chain(g1,g2).delay()

and it appears that the second group starts to process (task2.si(3)) after the first task in the first group (task1.si(1)) is done. I would expect task2.si(3) to start after tasks1.si(2) is done.

How can I chain together two groups so that the second group starts to process only after the first group has completed?

Thanks!

user1247196
  • 191
  • 11
  • 1
    Possible duplicate of [celery - chaining groups and subtasks. -> out of order execution](https://stackoverflow.com/questions/15123772/celery-chaining-groups-and-subtasks-out-of-order-execution) – gushitong May 14 '18 at 09:33

0 Answers0