diff --git a/lms/envs/common.py b/lms/envs/common.py index ad1b911ebb..ee3dff159c 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -2693,11 +2693,17 @@ DEBUG_TOOLBAR_PATCH_SETTINGS = False ################################# CELERY ###################################### -CELERY_IMPORTS = ( +CELERY_IMPORTS = [ # Since xblock-poll is not a Django app, and XBlocks don't get auto-imported # by celery workers, its tasks will not get auto-discovered: 'poll.tasks', -) +] + +# .. setting_name: CELERY_EXTRA_IMPORTS +# .. setting_default: [] +# .. setting_description: Adds extra packages that don't get auto-imported (Example: XBlocks). +# These packages are added in addition to those added by CELERY_IMPORTS. +CELERY_EXTRA_IMPORTS = [] # Message configuration diff --git a/lms/envs/production.py b/lms/envs/production.py index 611a9870fc..5e0213da9d 100644 --- a/lms/envs/production.py +++ b/lms/envs/production.py @@ -1068,3 +1068,6 @@ DISCUSSIONS_MFE_FEEDBACK_URL = ENV_TOKENS.get('DISCUSSIONS_MFE_FEEDBACK_URL', DI ############## DRF overrides ############## REST_FRAMEWORK.update(ENV_TOKENS.get('REST_FRAMEWORK', {})) + +############################# CELERY ############################ +CELERY_IMPORTS.extend(ENV_TOKENS.get('CELERY_EXTRA_IMPORTS', []))