I need to execute two sets of tasks step by step. The subtasks in each set of tasks are executed in parallel celery, but the second group of tasks needs to wait for the first group of tasks to be completed before continuing to execute
.from celery import group
from tasks import add
group1 = group([add.s(2, 2), add.s(4, 4),])
group2 = group([add.s(2, 2), add.s(4, 4),])
I want the tasks in groups1 to be executed concurrently first. This requires calling groups1.apply_async ()
of celery, but this will make the task groups1 execute asynchronously. I want group2 to wait for group1 to execute before continuing? Is there any way to do this in celery?