mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Refs #44 -- Added optional celery background queue for mails
This commit is contained in:
12
src/pretix/celery.py
Normal file
12
src/pretix/celery.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import os
|
||||
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pretix.settings")
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
if settings.HAS_CELERY:
|
||||
from celery import Celery
|
||||
app = Celery('pretix')
|
||||
|
||||
app.config_from_object('django.conf:settings')
|
||||
app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)
|
||||
Reference in New Issue
Block a user