
;  {{ ansible_managed }}
;
[program:notifier-celery-workers]

{% do notifier_env_vars.update(NOTIFIER_ENV_EXTRA) %}
environment={% for name,value in notifier_env_vars.items() -%}
                {{ name }}="{{ value }}",
            {%- endfor -%}
            PID="/var/tmp/notifier-scheduler.pid",LANG="en_US.UTF-8"
            {%- if NOTIFIER_THEME_NAME != "" %},DJANGO_SETTINGS_MODULE="notifier.settings_local"{% endif %}

command={{ NOTIFIER_VENV_DIR }}/bin/python manage.py celery worker -l {{ NOTIFIER_LOG_LEVEL }}

process_name=%(program_name)s
numprocs=1
stopasgroup=true
directory={{ NOTIFIER_CODE_DIR }}
umask=022
autostart=true
autorestart=true
startsecs=10
startretries=3
exitcodes=0,2
stopsignal=TERM
stopwaitsecs=10
redirect_stderr=false
stdout_logfile={{NOTIFIER_SUPERVISOR_LOG_DEST }}/notifier-celery-workers-stdout.log
stdout_logfile_maxbytes=1MB
stdout_logfile_backups=10
stdout_capture_maxbytes=1MB
stderr_logfile={{ NOTIFIER_SUPERVISOR_LOG_DEST }}/notifier-celery-workers-stderr.log
stderr_logfile_maxbytes=1MB
stderr_logfile_backups=10
stderr_capture_maxbytes=1MB
