Commit efa6269b by Feanil Patel

Call celery directly from supervisor.

Having the intermediate shell script causes the signals to not
propagate correctly.  So when supervisor stops the workers the
celery root process dies but the actual workers hang around. On
sandboxes this results in there eventually being lots of stray
workers that eventually chew through all the memory on the box.
parent 3e3e6d70
;
; {{ ansible_managed }}
;
[program:notifier-celery-workers]
command={{ notifier_app_dir }}/notifier-celery-workers-supervisor.sh
{% 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
......
#!/bin/bash
source {{ notifier_app_dir }}/notifier_env
cd {{ NOTIFIER_CODE_DIR }}
export PID='/var/tmp/notifier-scheduler.pid'
export LANG=en_US.UTF-8
{{ NOTIFIER_VENV_DIR }}/bin/python manage.py celery worker -l {{ NOTIFIER_LOG_LEVEL }}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment