From ba1e6b77b9384d85913058b1d9600a4a9dd284da Mon Sep 17 00:00:00 2001 From: Anas Hameed <68567262+Anas-hameed@users.noreply.github.com> Date: Fri, 25 Oct 2024 12:46:56 +0500 Subject: [PATCH] fix: xblock-poll's celery tasks were not registered (#28019) (#590) Co-authored-by: Braden MacDonald --- lms/envs/common.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lms/envs/common.py b/lms/envs/common.py index 170cb8d4b9da..f9d6a8ce2674 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -2402,6 +2402,12 @@ def _make_locale_paths(settings): # pylint: disable=missing-function-docstring ################################# CELERY ###################################### +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', +) + # Celery beat configuration CELERYBEAT_SCHEDULER = 'celery.beat:PersistentScheduler'