diff --git a/backend/application/__init__.py b/backend/application/__init__.py index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..b7ddb6f4e6c8780c810d6f0d10facaa46e01f735 100644 --- a/backend/application/__init__.py +++ b/backend/application/__init__.py @@ -0,0 +1,5 @@ +# This will make sure the app is always imported when +# Django starts so that shared_task will use this app. +from .celery import app as celery_app + +__all__ = ('celery_app',) \ No newline at end of file diff --git a/backend/application/celery.py b/backend/application/celery.py index d57b92ada7e3cc3c2e569a9b549d1ea2c52c2b31..10bce56c5f643ba19c776409ee2d5482e2fc3560 100644 --- a/backend/application/celery.py +++ b/backend/application/celery.py @@ -15,7 +15,7 @@ else: from celery import Celery app = Celery(f"application") -app.config_from_object('django.conf:settings') +app.config_from_object('django.conf:settings', namespace='CELERY') app.autodiscover_tasks(lambda: settings.INSTALLED_APPS) platforms.C_FORCE_ROOT = True