From d8d388c841414fe91e3a88d1bee7571602925fd8 Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Mon, 14 Nov 2011 12:24:48 +0100 Subject: [PATCH] Log the results of jobs. --- rq/worker.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rq/worker.py b/rq/worker.py index 92799ad..76636d1 100644 --- a/rq/worker.py +++ b/rq/worker.py @@ -73,6 +73,12 @@ class Worker(object): rv = func(*args, **kwargs) except Exception, e: rv = e + self.log.exception(e) + else: + if rv is not None: + self.log.info('Job result = %s' % (rv,)) + else: + self.log.info('Job ended normally without result') if rv is not None: p = conn.pipeline() conn.set(key, dumps(rv))