diff --git a/mistral/engine/actions.py b/mistral/engine/actions.py index c130c36f..ffa514c7 100644 --- a/mistral/engine/actions.py +++ b/mistral/engine/actions.py @@ -174,11 +174,16 @@ class Action(object): return "result = %s" % utils.cut(result.data) - wf_trace.info( - None, - "Action execution '%s' [%s -> %s, %s]" % - (self.action_ex.name, prev_state, state, _result_msg()) - ) + if prev_state != state: + wf_trace.info( + None, + "Action '%s' (%s) [%s -> %s, %s]" % + (self.action_ex.name, + self.action_ex.id, + prev_state, + state, + _result_msg()) + ) class PythonAction(Action): diff --git a/mistral/engine/tasks.py b/mistral/engine/tasks.py index 133b7964..85533819 100644 --- a/mistral/engine/tasks.py +++ b/mistral/engine/tasks.py @@ -96,7 +96,7 @@ class Task(object): if not self.task_ex: self._create_task_execution() - self.set_state(states.WAITING, 'Task execution is deferred.') + self.set_state(states.WAITING, 'Task is deferred.') self.waiting = True @@ -114,11 +114,17 @@ class Task(object): assert self.task_ex - wf_trace.info( - self.task_ex.workflow_execution, - "Task execution '%s' [%s -> %s]: %s" % - (self.task_ex.id, self.task_ex.state, state, state_info) - ) + if (self.task_ex.state != state or + self.task_ex.state_info != state_info): + wf_trace.info( + self.task_ex.workflow_execution, + "Task '%s' (%s) [%s -> %s, msg=%s]" % + (self.task_ex.name, + self.task_ex.id, + self.task_ex.state, + state, + state_info) + ) self.task_ex.state = state self.task_ex.state_info = state_info diff --git a/mistral/engine/workflows.py b/mistral/engine/workflows.py index 3de230d9..acf985ca 100644 --- a/mistral/engine/workflows.py +++ b/mistral/engine/workflows.py @@ -243,8 +243,8 @@ class Workflow(object): wf_trace.info( self.wf_ex, - "Execution of workflow '%s' [%s -> %s]" - % (self.wf_ex.workflow_name, cur_state, state) + "Workflow '%s' [%s -> %s, msg=%s]" + % (self.wf_ex.workflow_name, cur_state, state, state_info) ) else: msg = ("Can't change workflow execution state from %s to %s. "