This is the file provided at https://github.com/ask/django-celery/blob/master/contrib/supervisord/celeryd.conf . How can I run this conf file ?
I am running my django app using gunicorn
; =======================================
; celeryd supervisor example for Django
; =======================================
[program:celery]
command=/path/to/project/manage.py celeryd --loglevel=INFO
directory=/path/to/project
user=nobody
numprocs=1
stdout_logfile=/var/log/celeryd.log
stderr_logfile=/var/log/celeryd.log
autostart=true
autorestart=true
startsecs=10
; Need to wait for currently executing tasks to finish at shutdown.
; Increase this if you have very long running tasks.
stopwaitsecs = 600
; if rabbitmq is supervised, set its priority higher
; so it starts first
priority=998
Thanks
That configuration file can’t be run on its own; it is for use with supervisord.
You need to install supervisord (if you have pip, use
pip install supervisor), create a configuration file for it usingsudo echo_supervisord_conf > /etc/supervisord.confand then copy paste the contents of the file above into your supervisord configuration file as described in the supervisord documentation under Adding a program.So basically run the following at your shell:
and edit the config file to your heart’s content.