[program:beat]
command={{ celery }} -A {{ project_name }} beat
directory={{ project_directory }}
user=allianceserver
stdout_logfile={{ project_directory }}/log/beat.log
stderr_logfile={{ project_directory }}/log/beat.log
autostart=true
autorestart=true
startsecs=10
priority=998

[program:worker]
command={{ celery }} -A {{ project_name }} worker
directory={{ project_directory }}
user=allianceserver
numprocs=1
stdout_logfile={{ project_directory }}/log/worker.log
stderr_logfile={{ project_directory }}/log/worker.log
autostart=true
autorestart=true
startsecs=10
stopwaitsecs = 600
killasgroup=true
priority=998

{% if gunicorn %}
[program:gunicorn]
user = allianceserver
directory={{ project_directory }}
command={{ gunicorn }} {{ project_name }}.wsgi --workers=3 --timeout 120
stdout_logfile={{ project_directory }}/log/gunicorn.log
stderr_logfile={{ project_directory }}/log/gunicorn.log
autostart=true
autorestart=true
stopsignal=INT

{% endif %}
[group:{{ project_name }}]
programs=beat,worker{% if gunicorn %},gunicorn{% endif %}
priority=999
