Make errors more obvious, when running batch commands as subprocess
admin still must consult logs to determine cause, but at least UI won't hang
This commit is contained in:
parent
e462e41ae1
commit
f58b065316
|
@ -988,13 +988,14 @@ class BatchMasterView(MasterView):
|
||||||
except Exception as error:
|
except Exception as error:
|
||||||
log.warning("%s of '%s' batch failed: %s", handler_action, self.handler.batch_key, batch_uuid, exc_info=True)
|
log.warning("%s of '%s' batch failed: %s", handler_action, self.handler.batch_key, batch_uuid, exc_info=True)
|
||||||
|
|
||||||
# TODO: write error info to socket
|
# TODO: write minimal error info to socket
|
||||||
|
if progress:
|
||||||
# if progress:
|
progress.session.load()
|
||||||
# progress.session.load()
|
progress.session['error'] = True
|
||||||
# progress.session['error'] = True
|
progress.session['error_msg'] = (
|
||||||
# progress.session['error_msg'] = "Batch population failed: {} - {}".format(error.__class__.__name__, error)
|
"{} of '{}' batch failed (see logs for more info)").format(
|
||||||
# progress.session.save()
|
handler_action, self.handler.batch_key)
|
||||||
|
progress.session.save()
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue