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
=== modified file 'adt_cloud_worker/__init__.py'
--- adt_cloud_worker/__init__.py 2015-03-16 20:50:34 +0000
+++ adt_cloud_worker/__init__.py 2015-03-17 03:06:09 +0000
@@ -37,9 +37,10 @@
37 set_config_dict,37 set_config_dict,
38 upload_tarball_to_swift_container,38 upload_tarball_to_swift_container,
39)39)
40ROUTING_KEYS = (40
41 'amd64.nova',41ARCHITECTURES = (
42 'i386.nova'42 'amd64',
43 'i386'
43)44)
44API_VERSION = "v1"45API_VERSION = "v1"
4546
@@ -64,9 +65,11 @@
64 exchange = kombu.Exchange("adt.exchange", type="topic")65 exchange = kombu.Exchange("adt.exchange", type="topic")
65 queues = [66 queues = [
66 kombu.Queue(67 kombu.Queue(
67 'adt.requests.{}.{}'.format(68 'adt.requests.{}.nova'.format(arch),
68 key, API_VERSION), exchange, routing_key=key)69 exchange,
69 for key in ROUTING_KEYS70 routing_key="{}.nova.{}".format(arch, API_VERSION)
71 )
72 for arch in ARCHITECTURES
70 ]73 ]
71 return [Consumer(queues=queues, callbacks=[self.process])]74 return [Consumer(queues=queues, callbacks=[self.process])]
7275

Subscribers

People subscribed via source and target branches

to all changes: