mirror of https://github.com/rq/rq.git
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:
parent
7bda1ca969
commit
9f5b1545b6
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue