Skip to content
Snippets Groups Projects
Unverified Commit 8cd544b8 authored by Feanil Patel's avatar Feanil Patel Committed by GitHub
Browse files

Put settings import back because it's used here. (#25481)

But change the order so that celery is loaded first.
parent 3cee4b81
No related branches found
No related tags found
No related merge requests found
......@@ -13,7 +13,7 @@ from celery import Celery
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', 'cms.envs.production')
APP = Celery('proj')
......@@ -23,6 +23,10 @@ APP.conf.task_protocol = 1
APP.config_from_object('django.conf:settings')
APP.autodiscover_tasks()
# Import after autodiscovery has had a chance to connect to the import_module signal
# so celery doesn't miss any apps getting installed.
from django.conf import settings # pylint: disable=wrong-import-position,wrong-import-order
class Router(AlternateEnvironmentRouter):
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment