You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The docs are actually correct, but it took me a while to figure out why - I'll explain in case it helps others.
CELERY_ROUTES is the old celery setting name which has now been replaced by task_routes. However if you want to specify Celery settings in a Django settings file, they must be upper-case as required by Django docs. This would mean adding TASK_ROUTES to your Django settings file, but to avoid conflict with other django settings it's recommended to prefix celery settings with CELERY_, which would result in you adding for example CELERY_TASK_ROUTES to your Django settings file. Your code would then load this into the celery app by doing something like this:
This would result in Celery taking CELERY_TASK_ROUTES, stripping the namespace prefix to get TASK_ROUTES, and lower-casing it to get task_routes. The result being that it will set the celery config via the new name.
In summary:
CELERY_ROUTES is the old celery setting name
CELERY_TASK_ROUTES is an upper-cased, prefixed alteration of the new setting name, commonly used to set the new setting name from a Django settings file.
CELERY_ROUTES should be CELERY_TASK_ROUTES
http://docs.celeryproject.org/en/latest/userguide/configuration.html
spent a few hours before figuring that out :(
I imagine the same applied to CELERY_QUEUES
The text was updated successfully, but these errors were encountered: