summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsk Solem <ask@celeryproject.org>2014-01-13 15:15:20 +0000
committerAsk Solem <ask@celeryproject.org>2014-01-13 15:15:20 +0000
commitf612a949f9413fc87389ac85976b42bb39a81b1c (patch)
tree66d45797738f7dd09796a75657fbd420c037f0e8
parented6788c5ad79e577547fd603442835a5abe605bc (diff)
downloadkombu-f612a949f9413fc87389ac85976b42bb39a81b1c.tar.gz
Improve example in consumer user guide. Closes #298
-rw-r--r--docs/userguide/consumers.rst5
1 files changed, 2 insertions, 3 deletions
diff --git a/docs/userguide/consumers.rst b/docs/userguide/consumers.rst
index 76c53638..cccbd4ac 100644
--- a/docs/userguide/consumers.rst
+++ b/docs/userguide/consumers.rst
@@ -38,9 +38,8 @@ Draining events from several consumers:
from kombu.utils import nested
with connection.channel(), connection.channel() as (channel1, channel2):
- consumers = [Consumer(channel1, queues1, accept=['json']),
- Consumer(channel2, queues2, accept=['json'])]
- with nested(\*consumers):
+ with nested(Consumer(channel1, queues1, accept=['json']),
+ Consumer(channel2, queues2, accept=['json'])):
connection.drain_events(timeout=1)