diff options
author | Ask Solem <ask@celeryproject.org> | 2012-06-24 16:32:17 +0100 |
---|---|---|
committer | Ask Solem <ask@celeryproject.org> | 2012-06-24 16:32:17 +0100 |
commit | fa816f6dc920aeb7b68b75f98fa1656da57d05c8 (patch) | |
tree | c2f2d076cc62ea62405fb6f267accab61d1f67c9 /examples/simple_receive.py | |
parent | 4922c4aaea77be7a32a7d904104b055159e0da3e (diff) | |
download | kombu-fa816f6dc920aeb7b68b75f98fa1656da57d05c8.tar.gz |
BrokerConnection is now Connection in docs
Diffstat (limited to 'examples/simple_receive.py')
-rw-r--r-- | examples/simple_receive.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/simple_receive.py b/examples/simple_receive.py index 9d53aa35..e9b933b1 100644 --- a/examples/simple_receive.py +++ b/examples/simple_receive.py @@ -4,19 +4,19 @@ Example receiving a message using the SimpleQueue interface. from __future__ import with_statement -from kombu import BrokerConnection +from kombu import Connection #: Create connection #: If hostname, userid, password and virtual_host is not specified #: the values below are the default, but listed here so it can #: be easily changed. -with BrokerConnection("amqp://guest:guest@localhost:5672//") as conn: +with Connection('amqp://guest:guest@localhost:5672//') as conn: #: SimpleQueue mimics the interface of the Python Queue module. #: First argument can either be a queue name or a kombu.Queue object. #: If a name, then the queue will be declared with the name as the queue #: name, exchange name and routing key. - with conn.SimpleQueue("kombu_demo") as queue: + with conn.SimpleQueue('kombu_demo') as queue: message = queue.get(block=True, timeout=10) message.ack() print(message.payload) |