Skip to content

Commit 880aed0

Browse files
committed
chore(celery): use quorum queye
1 parent 1b56efa commit 880aed0

3 files changed

Lines changed: 13 additions & 23 deletions

File tree

charts/helmbroker/templates/_helpers.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ env:
2222
name: rabbitmq-creds
2323
key: password
2424
- name: "HELMBROKER_RABBITMQ_URL"
25-
value: "amqp://$(HELMBROKER_RABBITMQ_USERNAME):$(HELMBROKER_RABBITMQ_PASSWORD)@drycc-rabbitmq.{{$.Release.Namespace}}.svc.{{$.Values.global.clusterDomain}}:5672/drycc"
25+
value: "amqp://$(HELMBROKER_RABBITMQ_USERNAME):$(HELMBROKER_RABBITMQ_PASSWORD)@drycc-rabbitmq.{{$.Release.Namespace}}.svc.{{$.Values.global.clusterDomain}}:5672/helmbroker"
2626
{{- end }}
2727
{{- if (.Values.redisUrl) }}
2828
- name: HELMBROKER_REDIS_URL

rootfs/helmbroker/celery.py

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -33,43 +33,33 @@ class Config(object):
3333
task_routes={
3434
'helmbroker.tasks.provision': {
3535
'queue': 'helmbroker.high',
36-
'exchange': 'helmbroker.priority',
37-
'routing_key': 'helmbroker.priority.high',
36+
'exchange': 'helmbroker.priority', 'routing_key': 'helmbroker.priority.high',
3837
},
3938
'helmbroker.tasks.update': {
4039
'queue': 'helmbroker.high',
41-
'exchange': 'helmbroker.priority',
42-
'routing_key': 'helmbroker.priority.high',
40+
'exchange': 'helmbroker.priority', 'routing_key': 'helmbroker.priority.high',
4341
},
4442
'helmbroker.tasks.bind': {
4543
'queue': 'helmbroker.high',
46-
'exchange': 'helmbroker.priority',
47-
'routing_key': 'helmbroker.priority.high',
44+
'exchange': 'helmbroker.priority', 'routing_key': 'helmbroker.priority.high',
4845
},
4946
'helmbroker.tasks.deprovision': {
5047
'queue': 'helmbroker.middle',
51-
'exchange': 'helmbroker.priority',
52-
'routing_key': 'helmbroker.priority.middle',
48+
'exchange': 'helmbroker.priority', 'routing_key': 'helmbroker.priority.middle',
5349
},
5450
},
5551
task_queues=(
5652
Queue(
57-
'helmbroker.low',
58-
exchange=Exchange('helmbroker.priority', type="direct"),
59-
routing_key='helmbroker.priority.low',
60-
queue_arguments={'x-max-priority': 16},
53+
'helmbroker.low', exchange=Exchange('helmbroker.priority', type="direct"),
54+
routing_key='helmbroker.priority.low', queue_arguments={'x-queue-type': 'quorum'},
6155
),
6256
Queue(
63-
'helmbroker.high',
64-
exchange=Exchange('helmbroker.priority', type="direct"),
65-
routing_key='helmbroker.priority.high',
66-
queue_arguments={'x-max-priority': 64},
57+
'helmbroker.high', exchange=Exchange('helmbroker.priority', type="direct"),
58+
routing_key='helmbroker.priority.high', queue_arguments={'x-queue-type': 'quorum'},
6759
),
6860
Queue(
69-
'helmbroker.middle',
70-
exchange=Exchange('helmbroker.priority', type="direct"),
71-
routing_key='helmbroker.priority.middle',
72-
queue_arguments={'x-max-priority': 32},
61+
'helmbroker.middle', exchange=Exchange('helmbroker.priority', type="direct"),
62+
routing_key='helmbroker.priority.middle', queue_arguments={'x-queue-type': 'quorum'},
7363
),
7464
),
7565
)

rootfs/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ PyYAML==6.0.1
22
gunicorn==22.0.0
33
openbrokerapi==4.6.0
44
requests==2.31.0
5-
celery==5.4.0
5+
celery==5.5.0b3
66
redis==5.0.8
7-
jsonschema==4.21.1
7+
jsonschema==4.21.1

0 commit comments

Comments
 (0)