Closed smn closed 10 years ago
Often in our settings we default to CELERY_ALWAYS_EAGER = DEBUG
so if DEBUG
is on then tasks are executed immediately which works great for dev.
Yeah but we use this for other parts of our code in tunobase (bulk loading for example). Where theres completely alternate logic for when celery enabled is false, so I decided to just leave it like that.
I suppose the correct thing to do would be to update it to use the ALWAYS_EAGER so we can do that in this project then. (I don't think celery is even used in this Project unless we decide to use it for the SMS reset sending)
This relates to #2, availability & licensing of the tunobase code base.
Added a new pull request to resolve this ticket.
Closed with #22
It allows you to write your tasks as you normally would but if
CELERY_ALWAYS_EAGER
is set toTrue
they're immediately executed in a blocking fashion and not deferred to the workers. It avoids needing switches like this