Commit 26a01773 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI

Merge branch 'streamline_algorithm_process_error_handling' into 'master'

Handle error the same way for all algorithm types on execution

Closes beat.core#98

See merge request !75
parents a22c8063 d7207172
Pipeline #40749 passed with stages
in 6 minutes and 32 seconds
......@@ -222,9 +222,6 @@ class AlgorithmExecutor(object):
loop_channel=self.loop_channel,
)
if not result:
return False
else:
if self.algorithm.type == Algorithm.LEGACY:
logger.warning(
......@@ -260,23 +257,22 @@ class AlgorithmExecutor(object):
output=self.output_list[0],
)
else:
try:
result = self.runner.process(
inputs=self.input_list,
data_loaders=self.data_loaders,
outputs=self.output_list,
loop_channel=self.loop_channel,
)
except Exception:
result = None
result = self.runner.process(
inputs=self.input_list,
data_loaders=self.data_loaders,
outputs=self.output_list,
loop_channel=self.loop_channel,
)
if not result:
self.done({})
return False
break
for output in self.output_list:
output.close()
if not result:
return False
missing_data_outputs = [x for x in self.output_list if x.isDataMissing()]
if missing_data_outputs:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment