forked from CGM_Public/pretix_original
Add custom celery routing (#698)
This commit is contained in:
@@ -3,6 +3,7 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
from urllib.parse import urlparse
|
from urllib.parse import urlparse
|
||||||
|
|
||||||
|
from kombu import Queue
|
||||||
from pycountry import currencies
|
from pycountry import currencies
|
||||||
|
|
||||||
import django.conf.locale
|
import django.conf.locale
|
||||||
@@ -514,6 +515,17 @@ if config.has_option('sentry', 'dsn'):
|
|||||||
|
|
||||||
CELERY_TASK_SERIALIZER = 'json'
|
CELERY_TASK_SERIALIZER = 'json'
|
||||||
CELERY_RESULT_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 = {
|
BOOTSTRAP3 = {
|
||||||
'success_css_class': '',
|
'success_css_class': '',
|
||||||
|
|||||||
Reference in New Issue
Block a user