mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Add custom celery routing (#698)
This commit is contained in:
@@ -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': '',
|
||||
|
||||
Reference in New Issue
Block a user