Created
December 16, 2013 15:51
-
-
Save tijs/7989251 to your computer and use it in GitHub Desktop.
Standard celeryd configuration. Replace { project }, { app } and { app settings } with relevant details. This will of course be different if you use a different project layout. Set autoscale depending on project scale. 4,2 is fine for small projects. For larger projects check celery docs for optimal configuration.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# the name of this service as far as supervisor is concerned | |
[program:celeryd] | |
# the command to start celery | |
command = /home/deploy/{ project }/{ app }/venv/bin/python /home/deploy/{ project }/{ app }/{ app root }/manage.py celery worker --autoscale=4,2 --loglevel=INFO --settings={ app settings } | |
# the directory to be in while running this | |
directory = /home/deploy/{ project }/{ app }/{ app root } | |
# the user to run this service as | |
user = nobody | |
numprocs=1 | |
# start this at boot, and restart it if it fails | |
autostart = true | |
autorestart = true | |
# take stdout and stderr of celery and write to these log files | |
stdout_logfile = /var/log/supervisor/{ project }.celeryd.log | |
stderr_logfile = /var/log/supervisor/{ project }.celeryd_err.log | |
startsecs=10 | |
; Need to wait for currently executing tasks to finish at shutdown. | |
; Increase this if you have very long running tasks. | |
stopwaitsecs = 600 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment