Merge lp:~thomir-deactivatedaccount/adt-cloud-worker/trunk-fix-versions into lp:adt-cloud-worker

Proposed by Thomi Richards
Status: Merged
Approved by: Thomi Richards
Approved revision: 23
Merged at revision: 22
Proposed branch: lp:~thomir-deactivatedaccount/adt-cloud-worker/trunk-fix-versions
Merge into: lp:adt-cloud-worker
Diff against target: 31 lines (+9/-6)
1 file modified
adt_cloud_worker/__init__.py (+9/-6)
To merge this branch: bzr merge lp:~thomir-deactivatedaccount/adt-cloud-worker/trunk-fix-versions
Reviewer Review Type Date Requested Status
Celso Providelo (community) Approve
Review via email: mp+253143@code.launchpad.net

Commit message

Version the routing key, not the queue names.

Description of the change

Version the routing key, not the queue names.

To post a comment you must log in.
Revision history for this message
Celso Providelo (cprov) :
review: Needs Fixing
23. By Thomi Richards

Fix from code review.

Revision history for this message
Celso Providelo (cprov) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'adt_cloud_worker/__init__.py'
2--- adt_cloud_worker/__init__.py 2015-03-16 20:50:34 +0000
3+++ adt_cloud_worker/__init__.py 2015-03-17 03:06:09 +0000
4@@ -37,9 +37,10 @@
5 set_config_dict,
6 upload_tarball_to_swift_container,
7 )
8-ROUTING_KEYS = (
9- 'amd64.nova',
10- 'i386.nova'
11+
12+ARCHITECTURES = (
13+ 'amd64',
14+ 'i386'
15 )
16 API_VERSION = "v1"
17
18@@ -64,9 +65,11 @@
19 exchange = kombu.Exchange("adt.exchange", type="topic")
20 queues = [
21 kombu.Queue(
22- 'adt.requests.{}.{}'.format(
23- key, API_VERSION), exchange, routing_key=key)
24- for key in ROUTING_KEYS
25+ 'adt.requests.{}.nova'.format(arch),
26+ exchange,
27+ routing_key="{}.nova.{}".format(arch, API_VERSION)
28+ )
29+ for arch in ARCHITECTURES
30 ]
31 return [Consumer(queues=queues, callbacks=[self.process])]
32

Subscribers

People subscribed via source and target branches

to all changes: