Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add celery instance top django

Jakub Draganekc6c6f0213a8f
diff --git a/saleor/celery_mail.py b/saleor/celery_mail.py
new file mode 100644
index 0000000000..a0edb75d5d
--- /dev/null
+++ b/saleor/celery_mail.py
@@ -0,0 +1,14 @@
+from __future__ import unicode_literals
+
+import os
+from celery import Celery
+from django.conf import settings
+
+os.environ.setdefault("DJANGO_SETTINGS_MODULE", "saleor.settings")
+
+app = Celery('mail')
+
+CELERY_TIMEZONE = 'UTC'
+
+app.config_from_object('django.conf:settings', namespace='CELERY')
+app.autodiscover_tasks()