diff options
| author | Rafael H. Schloming <rhs@apache.org> | 2010-02-17 17:58:23 +0000 |
|---|---|---|
| committer | Rafael H. Schloming <rhs@apache.org> | 2010-02-17 17:58:23 +0000 |
| commit | ad2598d3f13f64d1ab9dc9dfc1eb17394a625d15 (patch) | |
| tree | 7d818e5a4ec0b122318c88f27c17fd63228b02b5 /qpid/python/examples | |
| parent | 7ca95b4b4850c7e37c1df37a84a7edfa170e3b35 (diff) | |
| download | qpid-python-ad2598d3f13f64d1ab9dc9dfc1eb17394a625d15.tar.gz | |
removed sender caching as this should now be unnecessary
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@911121 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python/examples')
| -rw-r--r-- | qpid/python/examples/reservations/common.py | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/qpid/python/examples/reservations/common.py b/qpid/python/examples/reservations/common.py index 4f9efd0227..24e64beda4 100644 --- a/qpid/python/examples/reservations/common.py +++ b/qpid/python/examples/reservations/common.py @@ -46,7 +46,6 @@ class Dispatcher: return () def run(self, session): - senders = {} while self.running(): msg = session.next_receiver().fetch() replies = self.dispatch(msg) @@ -54,22 +53,17 @@ class Dispatcher: count = len(replies) sequence = 1 for r in replies: - if senders.has_key(r.to): - rsnd = senders[r.to] - else: - rsnd = session.sender(r.to) - senders[r.to] = rsnd - r.correlation_id = msg.correlation_id r.properties["count"] = count r.properties["sequence"] = sequence sequence += 1 try: - rsnd.send(r) + snd = session.sender(r.to) + snd.send(r) except SendError, e: print e - del senders[r.to] - rsnd.close() + finally: + snd.close() session.acknowledge(msg) |
