diff --git a/tailbone/views/batch/core.py b/tailbone/views/batch/core.py index d178d60a..299f0a10 100644 --- a/tailbone/views/batch/core.py +++ b/tailbone/views/batch/core.py @@ -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