From 375173f1df8732a5534c199005049ba6235392e7 Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Wed, 28 Oct 2020 15:13:24 -0400 Subject: [PATCH] Use the default autodiscovery instead of passing in the installed apps. (#25467) Passing in the INSTALLED_APPS lambda seems to result in some tasks for certain apps like instructor_task and bulk_email to not get discovered properly. --- cms/celery.py | 2 +- lms/celery.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cms/celery.py b/cms/celery.py index 97c4c6f21e..6e1db257b3 100644 --- a/cms/celery.py +++ b/cms/celery.py @@ -22,7 +22,7 @@ APP.conf.task_protocol = 1 # Using a string here means the worker will not have to # pickle the object when using Windows. APP.config_from_object('django.conf:settings') -APP.autodiscover_tasks(lambda: settings.INSTALLED_APPS) +APP.autodiscover_tasks() class Router(AlternateEnvironmentRouter): diff --git a/lms/celery.py b/lms/celery.py index e3315d13a3..a8f0fce6e1 100644 --- a/lms/celery.py +++ b/lms/celery.py @@ -22,7 +22,7 @@ APP.conf.task_protocol = 1 # Using a string here means the worker will not have to # pickle the object when using Windows. APP.config_from_object('django.conf:settings') -APP.autodiscover_tasks(lambda: settings.INSTALLED_APPS) +APP.autodiscover_tasks() class Router(AlternateEnvironmentRouter):