Ensure custom exception handlers calls when Redis is down

main
Javier Lopez 9 years ago
parent e6a15c57b3
commit 4fb59a4ceb

@ -590,7 +590,12 @@ class Worker(object):
except Exception: except Exception:
job.set_status(JobStatus.FAILED, pipeline=pipeline) job.set_status(JobStatus.FAILED, pipeline=pipeline)
started_job_registry.remove(job, pipeline=pipeline) started_job_registry.remove(job, pipeline=pipeline)
try:
pipeline.execute() pipeline.execute()
except Exception:
# Ensure that custom exception handlers are called
# even if Redis is down
pass
self.handle_exception(job, *sys.exc_info()) self.handle_exception(job, *sys.exc_info())
return False return False

Loading…
Cancel
Save