Use correct settings for celery

This commit is contained in:
Jan Dittberner 2023-04-29 10:33:17 +02:00
parent 0962891a9b
commit 5db97f03d1

View file

@ -6,15 +6,15 @@ from celery import Celery
from django.conf import settings from django.conf import settings
os.environ.setdefault('DJANGO_SETTINGS_MODULE', os.environ.setdefault("DJANGO_SETTINGS_MODULE", "gnuviechadmin.settings")
'gnuviechadmin.settings.production')
app = Celery('gnuviechadmin') app = Celery("gnuviechadmin")
def get_installed_apps(): def get_installed_apps():
return settings.INSTALLED_APPS return settings.INSTALLED_APPS
app.config_from_object('django.conf:settings')
app.config_from_object("django.conf:settings")
app.autodiscover_tasks(get_installed_apps) app.autodiscover_tasks(get_installed_apps)