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:
|
||||
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
|
||||
|
||||
# if progress:
|
||||
# progress.session.load()
|
||||
# progress.session['error'] = True
|
||||
# progress.session['error_msg'] = "Batch population failed: {} - {}".format(error.__class__.__name__, error)
|
||||
# progress.session.save()
|
||||
# TODO: write minimal error info to socket
|
||||
if progress:
|
||||
progress.session.load()
|
||||
progress.session['error'] = True
|
||||
progress.session['error_msg'] = (
|
||||
"{} of '{}' batch failed (see logs for more info)").format(
|
||||
handler_action, self.handler.batch_key)
|
||||
progress.session.save()
|
||||
|
||||
return
|
||||
|
||||
|
|
Loading…
Reference in a new issue