Commit 183049b7 authored by Jerome Mariette's avatar Jerome Mariette
Browse files

handle reseted component from the status

parent 7a989a68
...@@ -88,6 +88,7 @@ class Workflow(threading.Thread): ...@@ -88,6 +88,7 @@ class Workflow(threading.Thread):
self.engine_arguments = ' --log-verbose ' self.engine_arguments = ' --log-verbose '
self.component_nameids_is_init = False self.component_nameids_is_init = False
self.component_nameids = {} self.component_nameids = {}
self.reseted_components = []
# try to parse engine arguments # try to parse engine arguments
try: try:
type, options, limit_submission = self.jflow_config_reader.get_batch() type, options, limit_submission = self.jflow_config_reader.get_batch()
...@@ -507,6 +508,7 @@ class Workflow(threading.Thread): ...@@ -507,6 +508,7 @@ class Workflow(threading.Thread):
# if collecting components and running workflow has not been done yet # if collecting components and running workflow has not been done yet
if self.step == 1: if self.step == 1:
try: try:
self.reseted_components = []
self.wf_execution_wrapper() self.wf_execution_wrapper()
except SystemExit, e: except SystemExit, e:
self.status = self.STATUS_FAILED self.status = self.STATUS_FAILED
...@@ -523,6 +525,7 @@ class Workflow(threading.Thread): ...@@ -523,6 +525,7 @@ class Workflow(threading.Thread):
# if the workflow was a dynamic one # if the workflow was a dynamic one
if self.step == 2: if self.step == 2:
try: try:
self.reseted_components = []
self.wf_execution_wrapper() self.wf_execution_wrapper()
except SystemExit, e: except SystemExit, e:
self.status = self.STATUS_FAILED self.status = self.STATUS_FAILED
...@@ -579,6 +582,7 @@ class Workflow(threading.Thread): ...@@ -579,6 +582,7 @@ class Workflow(threading.Thread):
"aborted": 0, "aborted": 0,
"completed": 0, "completed": 0,
"failed_commands": list() } "failed_commands": list() }
if component_nameid not in self.reseted_components:
try: try:
log = MakeflowLog(self.component_nameids[component_nameid]) log = MakeflowLog(self.component_nameids[component_nameid])
log.parse() log.parse()
...@@ -614,6 +618,7 @@ class Workflow(threading.Thread): ...@@ -614,6 +618,7 @@ class Workflow(threading.Thread):
if not found: if not found:
sys.stderr.write("Impossible to reset component '" + component_name + "'! This one is not part of the workflow\n") sys.stderr.write("Impossible to reset component '" + component_name + "'! This one is not part of the workflow\n")
sys.exit(1) sys.exit(1)
self.reseted_components.append(component_name)
self._serialize() self._serialize()
def makeflow_pretty_print_node(self, dag, node): def makeflow_pretty_print_node(self, dag, node):
......
Supports Markdown
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