praekeltfoundation / ghr-mobi

Mobi site for GHR
0 stars 1 forks source link

Use CELERY_ALWAYS_EAGER instead of `USE_CELERY` #13

Closed smn closed 10 years ago

smn commented 10 years ago

It allows you to write your tasks as you normally would but if CELERY_ALWAYS_EAGER is set to True they're immediately executed in a blocking fashion and not deferred to the workers. It avoids needing switches like this

smn commented 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.

michaelwhelehan commented 10 years ago

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)

smn commented 10 years ago

This relates to #2, availability & licensing of the tunobase code base.

euan commented 10 years ago

Added a new pull request to resolve this ticket.

smn commented 10 years ago

Closed with #22