From 518060fc51d383216410e6b35031217a80950250 Mon Sep 17 00:00:00 2001 From: Samuel Walladge Date: Thu, 12 Sep 2019 09:51:09 +0930 Subject: [PATCH] Include djangoapps.heartbeat by default If this isn't installed, the sample_task provided by openedx.core.djangoapps.heartbeat isn't imported, and thus are never registered with the celery workers. This sample_task is used for the extended heartbeat api call. Since the celery heartbeat check is turned on by default, we should also make sure this djangoapp and thus sample_task is registered by default. Otherwise the extended heartbeat check fails with the default configuration. --- cms/envs/common.py | 2 ++ lms/envs/common.py | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/cms/envs/common.py b/cms/envs/common.py index b2b7dcda2a..5fa2b88f8c 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -1357,6 +1357,8 @@ INSTALLED_APPS = [ 'openedx.features.discounts', 'experiments', + # so sample_task is available to celery workers + 'openedx.core.djangoapps.heartbeat', ] diff --git a/lms/envs/common.py b/lms/envs/common.py index fd14163cf2..696f8f2cfe 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -2501,7 +2501,10 @@ INSTALLED_APPS = [ # edx-drf-extensions 'csrf.apps.CsrfAppConfig', # Enables frontend apps to retrieve CSRF tokens. - 'xss_utils' + 'xss_utils', + + # so sample_task is available to celery workers + 'openedx.core.djangoapps.heartbeat', ] ######################### CSRF #########################################