From 3746b4536246394d19e591e0bf1254fff03e0767 Mon Sep 17 00:00:00 2001 From: wangxiyuan Date: Tue, 16 Feb 2016 14:36:01 +0800 Subject: [PATCH] Ensure hmget return right data format The Jenkins is done due to the funtional test[1] in redis backend. The reason is that we use hmget to get the information but hmget can't distinguish integer. it returns all value in string format. This patch did a quick fix to let jenkins work. [1]: https://github.com/openstack/python-zaqarclient/blob/master/zaqarclient/tests/queues/subscriptions.py#L212 Change-Id: I0dcb50535913457ae1ad705939dcff555c6e1ae8 --- zaqar/storage/redis/subscriptions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zaqar/storage/redis/subscriptions.py b/zaqar/storage/redis/subscriptions.py index e4ab6d8a..64c3c4c5 100644 --- a/zaqar/storage/redis/subscriptions.py +++ b/zaqar/storage/redis/subscriptions.py @@ -77,7 +77,7 @@ class SubscriptionController(base.Subscription): 'id': sid, 'source': record[0], 'subscriber': record[1], - 'ttl': record[2], + 'ttl': int(record[2]), 'options': self._unpacker(record[3]), } marker_next['next'] = sid