In fixing the incorrect behavior of what was previously in the handler

shutdown method, I made the same mistake in a slightly different way.
This commit is contained in:
Nate Coraor
2018-10-25 15:58:16 -04:00
parent ae12cc92eb
commit a6215ea68e
+3 -3
View File
@@ -965,12 +965,12 @@ class DefaultJobDispatcher(object):
job_wrapper.fail(DEFAULT_JOB_PUT_FAILURE_MESSAGE)
def shutdown(self):
failures = []
for name, runner in self.job_runners.items():
failures = []
try:
runner.shutdown()
except Exception:
failures.append(name)
log.exception("Failed to shutdown runner %s", name)
if failures:
raise Exception("Failed to shutdown runners: %s" % ', '.join(failures))
if failures:
raise Exception("Failed to shutdown runners: %s" % ', '.join(failures))