Skip to content

Commit

Permalink
better task discovery
Browse files Browse the repository at this point in the history
  • Loading branch information
tlambert03 committed Feb 15, 2025
1 parent 63ee989 commit e1d95e4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions backend/fpbase/celery.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import os

from celery import Celery

import proteins.tasks # noqa: F401
from django.conf import settings

if "DJANGO_SETTINGS_MODULE" not in os.environ:
os.environ["DJANGO_SETTINGS_MODULE"] = "config.settings.local"
Expand All @@ -11,4 +10,4 @@
app.config_from_object("django.conf:settings", namespace="CELERY")

# Load task modules from all registered Django app configs.
app.autodiscover_tasks()
app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)

0 comments on commit e1d95e4

Please sign in to comment.