From d78ec338c64abbb80437ca78ed9abdf99849d5af Mon Sep 17 00:00:00 2001 From: Colombo Date: Wed, 24 Jun 2020 11:44:58 +0400 Subject: [PATCH] fix Subprocessor now writes an error if it fails to process the data --- core/joblib/SubprocessorBase.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/joblib/SubprocessorBase.py b/core/joblib/SubprocessorBase.py index c7703d1..17e7056 100644 --- a/core/joblib/SubprocessorBase.py +++ b/core/joblib/SubprocessorBase.py @@ -226,8 +226,12 @@ class Subprocessor(object): cli.state = 0 elif op == 'error': #some error occured while process data, returning chunk to on_data_return + err_msg = obj.get('err_msg', None) + if err_msg is not None: + io.log_info(f'Error while processing data: {err_msg}') + if 'data' in obj.keys(): - self.on_data_return (cli.host_dict, obj['data'] ) + self.on_data_return (cli.host_dict, obj['data'] ) #and killing process cli.kill() self.clis.remove(cli)