Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Configurable timeouts for celery workers #2993

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions playbooks/roles/edxapp/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,7 @@ edxapp_git_ssh: "/tmp/edxapp_git_ssh.sh"
edxapp_legacy_course_data_dir: "{{ edxapp_app_dir }}/data"

edxapp_workers: "{{ EDXAPP_CELERY_WORKERS }}"
EDXAPP_WORKER_DEFAULT_STOPWAITSECS: 432000

# setup for python codejail
edxapp_sandbox_venv_dir: '{{ edxapp_venvs_dir }}/edxapp-sandbox'
Expand Down
2 changes: 1 addition & 1 deletion playbooks/roles/edxapp/templates/workers.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ stderr_logfile={{ supervisor_log_dir }}/%(program_name)s-stderr.log
command={{ edxapp_venv_dir + '/bin/newrelic-admin run-program ' if w.monitor and COMMON_ENABLE_NEWRELIC_APP else ''}}{{ edxapp_venv_bin }}/python {{ edxapp_code_dir }}/manage.py {{ w.service_variant }} --settings=aws celery worker --loglevel=info --queues=edx.{{ w.service_variant }}.core.{{ w.queue }} --hostname=edx.{{ w.service_variant }}.core.{{ w.queue }}.%%h --concurrency={{ w.concurrency }} {{ '--maxtasksperchild ' + w.max_tasks_per_child|string if w.max_tasks_per_child is defined else '' }}
killasgroup=true
stopasgroup=true
stopwaitsecs=432000
stopwaitsecs={{ w.stopwaitsecs | default(EDXAPP_WORKER_DEFAULT_STOPWAITSECS) }}
stopsignal=INT

{% endfor %}
Expand Down