Skip to content

Commit

Permalink
Address celery change requiring passing of custom task_cls to celery …
Browse files Browse the repository at this point in the history
…app init
  • Loading branch information
bjester committed Dec 12, 2024
1 parent eac2bc4 commit d9abe3c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion contentcuration/contentcuration/celery.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
from django.conf import settings

from contentcuration.utils.celery.app import CeleryApp
from contentcuration.utils.celery.tasks import CeleryTask

# set the default Django settings module for the 'celery' program.
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "contentcuration.settings")

app = CeleryApp("contentcuration")
# Celery update now requires that we must pass the task_cls to the CeleryApp, instead
# of setting it as an attribute on our custom Celery class
app = CeleryApp("contentcuration", task_cls=CeleryTask)
app.config_from_object(settings.CELERY)

0 comments on commit d9abe3c

Please sign in to comment.