Log the results of jobs.

main
Vincent Driessen 13 years ago
parent f21b2af2b6
commit d8d388c841

@ -73,6 +73,12 @@ class Worker(object):
rv = func(*args, **kwargs) rv = func(*args, **kwargs)
except Exception, e: except Exception, e:
rv = 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: if rv is not None:
p = conn.pipeline() p = conn.pipeline()
conn.set(key, dumps(rv)) conn.set(key, dumps(rv))

Loading…
Cancel
Save