From 6ba35738d46b66dbc6056a68f4124bf2153437ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Mon, 22 Jun 2020 12:17:41 +0200 Subject: [PATCH] Make sure that LMS can send tasks to the CMS In production, the ALTERNATE_WORKER_QUEUES setting is overridden by "" (empty string). This might prevent LMS from sending tasks to the CMS. We have not seen this issue emerge yet, but better be safe than sorry. We must be careful not to process the tasks from the CMS, just like for the CMS worker which does not process the tasks from the LMS. --- tutor/templates/apps/openedx/config/lms.env.json | 1 + tutor/templates/local/docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tutor/templates/apps/openedx/config/lms.env.json b/tutor/templates/apps/openedx/config/lms.env.json index 6209a81..45888d9 100644 --- a/tutor/templates/apps/openedx/config/lms.env.json +++ b/tutor/templates/apps/openedx/config/lms.env.json @@ -29,6 +29,7 @@ "CELERY_BROKER_HOSTNAME": "{{ RABBITMQ_HOST }}", "CELERY_BROKER_USER": "{{ RABBITMQ_USERNAME }}", "CELERY_BROKER_PASSWORD": "{{ RABBITMQ_PASSWORD }}", + "ALTERNATE_WORKER_QUEUES": "cms", "COMMENTS_SERVICE_URL": "http://{{ FORUM_HOST }}:4567", "COMMENTS_SERVICE_KEY": "forumapikey", "ENABLE_COMPREHENSIVE_THEMING": true, diff --git a/tutor/templates/local/docker-compose.yml b/tutor/templates/local/docker-compose.yml index c0184a9..82845ce 100644 --- a/tutor/templates/local/docker-compose.yml +++ b/tutor/templates/local/docker-compose.yml @@ -132,7 +132,7 @@ services: SERVICE_VARIANT: lms SETTINGS: ${EDX_PLATFORM_SETTINGS:-tutor.production} C_FORCE_ROOT: "1" # run celery tasks as root #nofear - command: ./manage.py lms celery worker --loglevel=info --hostname=edx.lms.core.default.%%h --maxtasksperchild 100 + command: ./manage.py lms celery worker --loglevel=info --hostname=edx.lms.core.default.%%h --maxtasksperchild 100 --exclude-queues=edx.cms.core.default restart: unless-stopped volumes: - ../apps/openedx/settings/lms/:/openedx/edx-platform/lms/envs/tutor/