0

I have First Function say A. This function will call Celery Task Cel_task1 in a loop and for each Cel_task1 will call another celery task Cel_task2 and each Cel_task2 will call celery task Cel_task3 and Cel_task3 will calculate result and save to DB.

def A==> **Cel_task1* -->**Cel_task2**-->**Cel_task3**

I want to run a celery task at the end of all other celery tasks. and will use the result of the Cel_task3

Lukas Würzburger
  • 6,543
  • 7
  • 41
  • 75
  • 1
    So you want to n Cel_task1 => Cel_task2 chains parallel in a loop and then when everything is finished, you need to run Cel_task3 once, correct? Sounds like a job for a chord which is a group + a final callback. Have a look at the docs: http://docs.celeryproject.org/en/latest/userguide/canvas.html#chords and an example:https://www.distributedpython.com/2018/06/26/celery-monte-carlo/ – Bjoern Stiel Sep 28 '18 at 08:51
  • @muhammad: please post some code if you'd like us to offer concrete examples of how to use `chords` and `groups`. – 2ps Oct 04 '18 at 12:22

0 Answers0