A chord needs a result backend.
1 2 3 4 5 6 7 8 9 10 11 12 13 | # ====================================================================== # Q: Celery: chain, group, chord. When do you use them? # # A chord needs a result backend. I keep task results small (IDs, not large # objects). For large workflows I prefer state in the database, so the workflow # can continue after a failure. # ====================================================================== from celery import chain, group, chord chain(fetch_orders.s(day), build_report.s(), email_report.s(to))() # sequential, passes the result along group(sync_supplier.s(s.id) for s in suppliers)() # parallel chord((price_for_region.s(r) for r in regions), merge_prices.s())() # parallel, then a callback |