[Django]-Celery task group not being executed in background and results in exception

5👍

You’re calling the tasks directly in your list comprehension when you create the group, so they’re executed then and there. You need to use the .subtask() method (or its shortcut, .s()) to create the subtasks without calling them:

job = group([update_statistics.s(f.profile, category) for f in forecasts])

Leave a comment