Add custom celery routing (#698)

This commit is contained in:
Raphael Michel
2017-12-11 16:07:19 +01:00
committed by GitHub
parent 9ab39904e8
commit fade09ca8f

View File

@@ -3,6 +3,7 @@ import os
import sys
from urllib.parse import urlparse
from kombu import Queue
from pycountry import currencies
import django.conf.locale
@@ -514,6 +515,17 @@ if config.has_option('sentry', 'dsn'):
CELERY_TASK_SERIALIZER = 'json'
CELERY_RESULT_SERIALIZER = 'json'
CELERY_TASK_DEFAULT_QUEUE = 'default'
CELERY_TASK_QUEUES = (
Queue('default', routing_key='default.#'),
Queue('checkout', routing_key='checkout.#'),
Queue('mail', routing_key='mail.#'),
)
CELERY_TASK_ROUTES = ([
('pretix.base.services.cart.*', {'queue': 'checkout'}),
('pretix.base.services.orders.*', {'queue': 'checkout'}),
('pretix.base.services.mail.*', {'queue': 'mail'}),
],)
BOOTSTRAP3 = {
'success_css_class': '',