@@ -20,7 +20,7 @@ class Config(object):
2020 result_expires = 24 * 60 * 60
2121 broker_url = os .environ .get ("DRYCC_RABBITMQ_URL" , 'amqp://guest:guest@127.0.0.1:5672/' ) # noqa
2222 broker_connection_retry_on_startup = True
23- task_default_queue = 'low'
23+ task_default_queue = 'helmbroker. low'
2424 task_default_exchange = 'helmbroker.priority'
2525 task_default_routing_key = 'helmbroker.priority.low'
2626 broker_connection_retry_on_startup = True
@@ -31,19 +31,46 @@ class Config(object):
3131app .config_from_object (Config ())
3232app .conf .update (
3333 task_routes = {
34- 'helmbroker.tasks' : {
35- 'queue' : 'low ' ,
34+ 'helmbroker.tasks.provision ' : {
35+ 'queue' : 'helmbroker.high ' ,
3636 'exchange' : 'helmbroker.priority' ,
3737 'routing_key' : 'helmbroker.priority.high' ,
3838 },
39+ 'helmbroker.tasks.update' : {
40+ 'queue' : 'helmbroker.high' ,
41+ 'exchange' : 'helmbroker.priority' ,
42+ 'routing_key' : 'helmbroker.priority.high' ,
43+ },
44+ 'helmbroker.tasks.bind' : {
45+ 'queue' : 'helmbroker.high' ,
46+ 'exchange' : 'helmbroker.priority' ,
47+ 'routing_key' : 'helmbroker.priority.high' ,
48+ },
49+ 'helmbroker.tasks.deprovision' : {
50+ 'queue' : 'helmbroker.middle' ,
51+ 'exchange' : 'helmbroker.priority' ,
52+ 'routing_key' : 'helmbroker.priority.middle' ,
53+ },
3954 },
4055 task_queues = (
4156 Queue (
42- 'low' ,
57+ 'helmbroker. low' ,
4358 exchange = Exchange ('helmbroker.priority' , type = "direct" ),
4459 routing_key = 'helmbroker.priority.low' ,
4560 queue_arguments = {'x-max-priority' : 16 },
4661 ),
62+ Queue (
63+ 'helmbroker.high' ,
64+ exchange = Exchange ('helmbroker.priority' , type = "direct" ),
65+ routing_key = 'helmbroker.priority.high' ,
66+ queue_arguments = {'x-max-priority' : 64 },
67+ ),
68+ Queue (
69+ 'helmbroker.middle' ,
70+ exchange = Exchange ('helmbroker.priority' , type = "direct" ),
71+ routing_key = 'helmbroker.priority.middle' ,
72+ queue_arguments = {'x-max-priority' : 32 },
73+ ),
4774 ),
4875)
4976app .autodiscover_tasks (("helmbroker.tasks" ,))
0 commit comments