Skip to content
Snippets Groups Projects
Commit 9b5aa4f9 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[algorithm][Runner] Use is_autonomous property in checks

parent 4f985403
Branches
Tags
2 merge requests!281.6.x,!27Soft loop
...@@ -204,7 +204,7 @@ class Runner(object): ...@@ -204,7 +204,7 @@ class Runner(object):
# The method is optional # The method is optional
if hasattr(self.obj, 'prepare'): if hasattr(self.obj, 'prepare'):
if self.algorithm.type == Algorithm.AUTONOMOUS: if self.algorithm.is_autonomous:
self.prepared = loader.run(self.obj, 'prepare', self.exc, data_loaders.secondaries()) self.prepared = loader.run(self.obj, 'prepare', self.exc, data_loaders.secondaries())
else: else:
self.prepared = loader.run(self.obj, 'prepare', self.exc, data_loaders) self.prepared = loader.run(self.obj, 'prepare', self.exc, data_loaders)
...@@ -252,7 +252,7 @@ class Runner(object): ...@@ -252,7 +252,7 @@ class Runner(object):
return loader.run(self.obj, 'process', self.exc, inputs, data_loaders, return loader.run(self.obj, 'process', self.exc, inputs, data_loaders,
outputs_to_use) outputs_to_use)
elif self.algorithm.type == Algorithm.AUTONOMOUS: elif self.algorithm.is_autonomous:
run_args = [self.obj, 'process', self.exc, data_loaders, outputs_to_use] run_args = [self.obj, 'process', self.exc, data_loaders, outputs_to_use]
has_loop_arg = utils.has_argument(self.obj.process, 'loop_channel') has_loop_arg = utils.has_argument(self.obj.process, 'loop_channel')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment