Fix: store the job result in the correct key.

And expire job hash in Redis after 500 seconds (by default).

Fixes #27.
This commit is contained in:
Vincent Driessen 2012-02-13 16:44:38 +01:00
parent 7bda1ca969
commit 9f5b1545b6
1 changed files with 2 additions and 2 deletions

View File

@ -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