mirror of https://github.com/fspc/workstand.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.6 KiB
46 lines
1.6 KiB
9 years ago
|
[group:{{ app_name }}]
|
||
|
programs=django,celerybeat,celeryworker
|
||
|
[program:django]
|
||
|
command={{ venv }}/bin/gunicorn -b 127.0.0.1:{{ app_port }} {{ app_name }}.wsgi:application
|
||
|
directory={{ app_dir }}
|
||
|
environment=DJANGO_DB_PASSWORD="{{ db_user_password }}",DJANGO_SECRET_KEY="{{ django_key }}",DJANGO_SETTINGS_MODULE="{{ settings_module }}"
|
||
|
autostart=true
|
||
|
autorestart=true
|
||
|
redirect_stderr=true
|
||
|
user={{ app_name }}
|
||
|
|
||
|
[program:celerybeat]
|
||
|
command={{ venv }}/bin/celery -A {{ app_name }} beat
|
||
|
environment=DJANGO_DB_PASSWORD="{{ db_user_password }}",DJANGO_SECRET_KEY="{{ django_key }}",DJANGO_SETTINGS_MODULE="{{ settings_module }}"
|
||
|
directory={{ app_dir }}
|
||
|
autostart=true
|
||
|
autorestart=true
|
||
|
redirect_stderr=true
|
||
|
user={{ app_name }}
|
||
|
|
||
|
[program:celeryworker]
|
||
|
command={{ venv }}/bin/celery -A {{ app_name }} worker
|
||
|
environment=DJANGO_DB_PASSWORD="{{ db_user_password }}",DJANGO_SECRET_KEY="{{ django_key }}",DJANGO_SETTINGS_MODULE="{{ settings_module }}",PYTHON_PATH={{ app_dir }}
|
||
|
directory={{ app_dir }}
|
||
|
autostart=true
|
||
|
autorestart=true
|
||
|
stdout_logfile=/var/log/celeryd/{{ app_name }}.log
|
||
|
stderr_logfile=/var/log/celeryd/{{ app_name }}.log
|
||
|
user={{ app_name }}
|
||
|
numprocs=1
|
||
|
|
||
|
startsecs=10
|
||
|
|
||
|
; Need to wait for currently executing tasks to finish at shutdown.
|
||
|
; Increase this if you have very long running tasks.
|
||
|
stopwaitsecs = 600
|
||
|
|
||
|
; When resorting to send SIGKILL to the program to terminate it
|
||
|
; send SIGKILL to its whole process group instead,
|
||
|
; taking care of its children as well.
|
||
|
killasgroup=true
|
||
|
|
||
|
; Set Celery priority higher than default (999)
|
||
|
; so, if rabbitmq is supervised, it will start first.
|
||
|
priority=1000
|