prevent job exception being logged twice (#1440)

main
PetreM 4 years ago committed by GitHub
parent 6bfd47f735
commit 8415ea7eb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1046,7 +1046,7 @@ class Worker(object):
def handle_exception(self, job, *exc_info): def handle_exception(self, job, *exc_info):
"""Walks the exception handler stack to delegate exception handling.""" """Walks the exception handler stack to delegate exception handling."""
exc_string = ''.join(traceback.format_exception(*exc_info)) exc_string = ''.join(traceback.format_exception(*exc_info))
self.log.error(exc_string, exc_info=True, extra={ self.log.error(exc_string, extra={
'func': job.func_name, 'func': job.func_name,
'arguments': job.args, 'arguments': job.args,
'kwargs': job.kwargs, 'kwargs': job.kwargs,

Loading…
Cancel
Save