From 606f7f7cb317c385c2c5ca04c2f22795c8cd128a Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Sun, 13 Nov 2011 14:59:34 +0100 Subject: [PATCH] Fix expire call. --- __init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index a6cbe64..19cee28 100644 --- a/__init__.py +++ b/__init__.py @@ -15,4 +15,7 @@ def queue_daemon(app, queue_keys, rv_ttl=500): except Exception, e: rv = e if rv is not None: - conn.setex(key, rv_ttl, dumps(rv)) + p = conn.pipeline() + conn.set(key, dumps(rv)) + conn.expire(key, rv_ttl) + p.execute()