From 9f5b1545b6a4e824318909561224da37e058b019 Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Mon, 13 Feb 2012 16:44:38 +0100 Subject: [PATCH] Fix: store the job result in the correct key. And expire job hash in Redis after 500 seconds (by default). Fixes #27. --- rq/worker.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rq/worker.py b/rq/worker.py index cb8c2821..239fbe32 100644 --- a/rq/worker.py +++ b/rq/worker.py @@ -339,7 +339,7 @@ class Worker(object): self.log.info('Job OK, result = %s' % (yellow(rv),)) if rv is not None: p = conn.pipeline() - p.set(job.result, dumps(rv)) - p.expire(job.result, self.rv_ttl) + p.hset(job.key, 'result', dumps(rv)) + p.expire(job.key, self.rv_ttl) p.execute() return True