Commit b37a6262 authored by Frédéric Escudié's avatar Frédéric Escudié
Browse files

Add mail management when an error occur in a component.

parent 4f1d7d2f
......@@ -847,19 +847,19 @@ class Workflow(threading.Thread):
self._postprocess_status = self.STATUS_PENDING
self._serialize()
self.wf_execution_wrapper()
self.component_nameids_is_init = True
if self.dynamic_component_present:
self.__step = 2
else:
self._execute_weaver()
self.__step = 3
except:
self._status = self.STATUS_FAILED
self.end_time = time.time()
self._serialize()
self._send_email()
raise
self.component_nameids_is_init = True
if self.dynamic_component_present:
self.__step = 2
else:
self._execute_weaver()
self.__step = 3
self._serialize()
finally:
self._serialize()
# if the workflow was a dynamic one
if self.__step == 2:
try:
......@@ -869,16 +869,16 @@ class Workflow(threading.Thread):
self._postprocess_status = self.STATUS_PENDING
self._serialize()
self.wf_execution_wrapper()
if len(self.components_to_exec) > 0:
self._execute_weaver()
self.__step = 3
except:
self._status = self.STATUS_FAILED
self.end_time = time.time()
self._serialize()
self._send_email()
raise
if len(self.components_to_exec) > 0:
self._execute_weaver()
self.__step = 3
self._serialize()
finally:
self._serialize()
# if post processing has ne been done yet
if self.__step == 3:
try:
......
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