-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added optional celery support #266
Conversation
While this is good, I've never been a fan of sticking Celery code into the Would you be up for using that pattern instead? |
Yeah, that looks promising, I wasn't aware of that. I'll try to put something together tomorrow. From a first quick glance I see two possible problems:
|
Regarding tasks, the best practice is to have a The only exception is tasks that are not tied to applications. Taskman sounds good to me, to be honest. |
I'm not a giant fan of If this approach turns out to have problems, well then there is a reason why we consider cookiecutter-django bleeding edge. 😜 |
I just changed |
Hey, this is great, guys! To restate here what I just posted on the Reddit: I am using the celeryd init.d script provided by Celery and am not using I have not had any issues with autodiscovery. |
Also, if there are project-level tasks, then I think That way, autodiscovery will pick them up properly. |
One more note. I do not like the fact that one's settings module needs to be hard-coded into the celery config. To work around this, I have a /config/celery_config.py. It contains just one line:
Then in my
This keeps local instance configuration is the right location. |
Then you couldn't use @shared_task decorator, which is usually more appropriate unless u r building a tiny app. Even if you will be able to use it by defining an import statement |
Uses the django:// BROKER_URL as default. One could argue that this might not be the best choice, because the current status is
experimental <http://celery.readthedocs.org/en/latest/getting-started/brokers/django.html>
_. On the other hand, this is the only broker supported out of the box.
Any thoughts?