2👍
After much searching, the most complete answer I found for this question is here. These directions flesh out the skimpy official directions for daemonizing celeryd. I’ll copy the gist here, but you should follow the link, because Michael has explained some parts in more detail.
The main idea is that you need scripts in three places:
- /etc/init.d/celeryd
- /etc/default/celeryd
- myApp/settings.py
Settings.py appears to be the same as in development mode. So if that’s already set up, there are four steps to shifting to production:
- Download the daemon script since it’s not included in the installation:
https://github.com/celery/celery/tree/3.0/extra/generic-init.d/ - Put it in /etc/init.d/celeryd
- Make a file in /etc/default/celeryd, and put the variables here into it:
http://docs.celeryproject.org/en/latest/tutorials/daemonizing.html#example-django-configuration - Start the script
This solved my problem.
1👍
I think the reason you are not getting any response from celery, is because celeryd server might not be running. You could find out about it by doing ps -ef |grep celeryd
. In order to figure out what is the error while trying to run celeryd, you might want to do the following.
In your settings.py file you could give the path to the celery log file CELERYD_LOG_FILE = <Path to the log file>
and while running celeryd server you could specify the level manage.py celeryd -l DEBUG
.
- [Django]-How to throw custom exception with custom error code on fly in django rest framework and override default fields in exception response
- [Django]-Django can not delete csrftoken after logout
- [Django]-Django-filter: filtering by model property
- [Django]-Pass variable from middleware to templates