Skip to content Skip to sidebar Skip to footer

Celery Task Group Not Being Executed In Background And Results In Exception

My Celery task isn't executing in the background in my Django 1.7/Python3 project. # settings.py BROKER_URL = 'redis://localhost:6379/0' CELERY_RESULTBACKEND = BROKER_URL CELERYBE

Solution 1:

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])

Post a Comment for "Celery Task Group Not Being Executed In Background And Results In Exception"