refactor: consider celery imports from common settings plus env tokens (#29739)
This commit is contained in:
committed by
GitHub
parent
0be6d3c8ab
commit
a099d9a10b
@@ -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
|
||||
|
||||
|
||||
@@ -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', []))
|
||||
|
||||
Reference in New Issue
Block a user