Merge lp:~cprov/adt-cloud-worker/qos into lp:adt-cloud-worker

Proposed by Celso Providelo
Status: Merged
Approved by: Celso Providelo
Approved revision: 33
Merged at revision: 32
Proposed branch: lp:~cprov/adt-cloud-worker/qos
Merge into: lp:adt-cloud-worker
Diff against target: 14 lines (+4/-0)
1 file modified
adt_cloud_worker/__init__.py (+4/-0)
To merge this branch: bzr merge lp:~cprov/adt-cloud-worker/qos
Reviewer Review Type Date Requested Status
Paul Larson Approve
Review via email: mp+253729@code.launchpad.net

Commit message

Set a fair QoS to our multi-worker environment (prefetch_count=1)

Description of the change

Set a fair QoS to our multi-worker environment (prefetch_count=1)

To post a comment you must log in.
lp:~cprov/adt-cloud-worker/qos updated
33. By Celso Providelo

better wording.

Revision history for this message
Paul Larson (pwlars) wrote :

Same question as the other related one, otherwise +1

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-20 01:52:28 +0000
+++ adt_cloud_worker/__init__.py 2015-03-20 19:17:31 +0000
@@ -63,6 +63,10 @@
6363
64 def get_consumers(self, Consumer, channel):64 def get_consumers(self, Consumer, channel):
65 """Return consumers instances for all configured queues."""65 """Return consumers instances for all configured queues."""
66 # Set a fair QoS for a multi-worker environment with
67 # late-acknowledgement. Each worker should only be fed a single
68 # message at time (prefetch_count).
69 channel.basic_qos(prefetch_size=0, prefetch_count=1, a_global=False)
66 exchange = kombu.Exchange("adt.exchange", type="topic")70 exchange = kombu.Exchange("adt.exchange", type="topic")
67 queues = [71 queues = [
68 kombu.Queue(72 kombu.Queue(

Subscribers

People subscribed via source and target branches