diff options
author | Rafael H. Schloming <rhs@apache.org> | 2010-07-08 15:53:49 +0000 |
---|---|---|
committer | Rafael H. Schloming <rhs@apache.org> | 2010-07-08 15:53:49 +0000 |
commit | 124fd2ea104c564c7f72d65d5a6ce697e88f7474 (patch) | |
tree | a722d75ab17c94e435a4be7a6ec7dabed13e48fa /python/qpid/messaging/driver.py | |
parent | 0a7f2e44f41288e231b1008ce25ab5bf137251dd (diff) | |
download | qpid-python-124fd2ea104c564c7f72d65d5a6ce697e88f7474.tar.gz |
convert ttl from seconds to milliseconds
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@961824 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qpid/messaging/driver.py')
-rw-r--r-- | python/qpid/messaging/driver.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/python/qpid/messaging/driver.py b/python/qpid/messaging/driver.py index 2175715c77..a3c565f205 100644 --- a/python/qpid/messaging/driver.py +++ b/python/qpid/messaging/driver.py @@ -980,6 +980,7 @@ class Engine: break for snd in ssn.senders: + # XXX: should included snd.acked in this if snd.synced >= snd.queued and sst.need_sync: sst.write_cmd(ExecutionSync(), sync_noop) @@ -1182,9 +1183,11 @@ class Engine: if msg.priority is not None: dp.priority = msg.priority if msg.ttl is not None: - dp.ttl = msg.ttl + dp.ttl = long(msg.ttl*1000) enc, dec = get_codec(msg.content_type) body = enc(msg.content) + + # XXX: this is not safe for out of order, can this be triggered by pre_ack? def msg_acked(): # XXX: should we log the ack somehow too? snd.acked += 1 @@ -1243,7 +1246,8 @@ class Engine: if dp.delivery_mode is not None: msg.durable = dp.delivery_mode == delivery_mode.persistent msg.priority = dp.priority - msg.ttl = dp.ttl + if dp.ttl is not None: + msg.ttl = dp.ttl/1000.0 msg.redelivered = dp.redelivered msg.properties = mp.application_headers or {} if mp.app_id is not None: |