diff --git a/cms/celery.py b/cms/celery.py index 6e1db257b3..3184dc6565 100644 --- a/cms/celery.py +++ b/cms/celery.py @@ -9,7 +9,6 @@ Taken from: https://celery.readthedocs.org/en/latest/django/first-steps-with-dja import os from celery import Celery -from django.conf import settings from openedx.core.lib.celery.routers import AlternateEnvironmentRouter diff --git a/cms/envs/common.py b/cms/envs/common.py index 1c29f6d23f..96adfb0319 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -1213,13 +1213,6 @@ WEBPACK_CONFIG_PATH = 'webpack.prod.config.js' ################################# CELERY ###################################### -# Auto discover tasks fails to detect contentstore tasks -CELERY_IMPORTS = ( - 'cms.djangoapps.contentstore.tasks', - 'openedx.core.djangoapps.bookmarks.tasks', - 'openedx.core.djangoapps.ccxcon.tasks', -) - # Message configuration CELERY_TASK_SERIALIZER = 'json' diff --git a/lms/celery.py b/lms/celery.py index a8f0fce6e1..dd9a23a8cf 100644 --- a/lms/celery.py +++ b/lms/celery.py @@ -9,12 +9,11 @@ Taken from: https://celery.readthedocs.org/en/latest/django/first-steps-with-dja import os from celery import Celery -from django.conf import settings from openedx.core.lib.celery.routers import AlternateEnvironmentRouter # set the default Django settings module for the 'celery' program. -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'proj.settings') +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'lms.envs.production') APP = Celery('proj') diff --git a/lms/envs/common.py b/lms/envs/common.py index cf147b1876..d5a1f21ded 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -2230,15 +2230,6 @@ DEBUG_TOOLBAR_PATCH_SETTINGS = False ################################# CELERY ###################################### -# Celery's task autodiscovery won't find tasks nested in a tasks package. -# Tasks are only registered when the module they are defined in is imported. -CELERY_IMPORTS = ( - 'poll.tasks', - 'lms.djangoapps.instructor_task.tasks', - 'lms.djangoapps.bulk_email.tasks', - 'openedx.core.djangoapps.bookmarks.tasks', -) - # Message configuration CELERY_TASK_SERIALIZER = 'json'