Commit b284c816 authored by Jerome Mariette's avatar Jerome Mariette
Browse files

change step by __step

parent f55aa079
......@@ -115,7 +115,7 @@ class Workflow(threading.Thread):
self.status = self.STATUS_STARTED
self.start_time = None
self.end_time = None
self.step = None
self.__step = None
self.stderr = None
self.args = args
self.dynamic_component_present = False
......@@ -808,21 +808,21 @@ class Workflow(threading.Thread):
"""
try:
# if this is the first time the workflow run
if self.step == None :
if self.__step == None :
self.start_time = time.time()
self.step = 0
self.__step = 0
self.status = self.STATUS_STARTED
self.end_time = None
# if some args are provided, let's fill the parameters
self._set_parameters(self.args)
self._serialize()
# if pre_processing has not been done yet
if self.step == 0:
if self.__step == 0:
self.pre_process()
self.step = 1
self.__step = 1
self._serialize()
# if collecting components and running workflow has not been done yet
if self.step == 1:
if self.__step == 1:
try:
self.reseted_components = []
self.components = []
......@@ -836,13 +836,13 @@ class Workflow(threading.Thread):
raise
self.component_nameids_is_init = True
if self.dynamic_component_present:
self.step = 2
self.__step = 2
else:
self._execute_weaver()
self.step = 3
self.__step = 3
self._serialize()
# if the workflow was a dynamic one
if self.step == 2:
if self.__step == 2:
try:
self.reseted_components = []
self.components = []
......@@ -856,10 +856,10 @@ class Workflow(threading.Thread):
raise
if len(self.components_to_exec) > 0:
self._execute_weaver()
self.step = 3
self.__step = 3
self._serialize()
# if post processing has ne been done yet
if self.step == 3:
if self.__step == 3:
self.post_process()
if self.status == self.STATUS_STARTED: self.status = self.STATUS_COMPLETED
self.end_time = time.time()
......@@ -934,7 +934,7 @@ class Workflow(threading.Thread):
def reset_component(self, component_name):
# first reinit the step to the execution step
self.step = 1
self.__step = 1
found = False
for cpt in self.components:
if cpt.get_nameid() == component_name:
......
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