Slightly improve workflow trace logging
Change-Id: Ia5e8dd621cca67bafa8631252315e7617ffa8555
This commit is contained in:
parent
c58671344e
commit
4bdda3b6ed
@ -174,10 +174,15 @@ class Action(object):
|
|||||||
|
|
||||||
return "result = %s" % utils.cut(result.data)
|
return "result = %s" % utils.cut(result.data)
|
||||||
|
|
||||||
|
if prev_state != state:
|
||||||
wf_trace.info(
|
wf_trace.info(
|
||||||
None,
|
None,
|
||||||
"Action execution '%s' [%s -> %s, %s]" %
|
"Action '%s' (%s) [%s -> %s, %s]" %
|
||||||
(self.action_ex.name, prev_state, state, _result_msg())
|
(self.action_ex.name,
|
||||||
|
self.action_ex.id,
|
||||||
|
prev_state,
|
||||||
|
state,
|
||||||
|
_result_msg())
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ class Task(object):
|
|||||||
if not self.task_ex:
|
if not self.task_ex:
|
||||||
self._create_task_execution()
|
self._create_task_execution()
|
||||||
|
|
||||||
self.set_state(states.WAITING, 'Task execution is deferred.')
|
self.set_state(states.WAITING, 'Task is deferred.')
|
||||||
|
|
||||||
self.waiting = True
|
self.waiting = True
|
||||||
|
|
||||||
@ -114,10 +114,16 @@ class Task(object):
|
|||||||
|
|
||||||
assert self.task_ex
|
assert self.task_ex
|
||||||
|
|
||||||
|
if (self.task_ex.state != state or
|
||||||
|
self.task_ex.state_info != state_info):
|
||||||
wf_trace.info(
|
wf_trace.info(
|
||||||
self.task_ex.workflow_execution,
|
self.task_ex.workflow_execution,
|
||||||
"Task execution '%s' [%s -> %s]: %s" %
|
"Task '%s' (%s) [%s -> %s, msg=%s]" %
|
||||||
(self.task_ex.id, self.task_ex.state, state, state_info)
|
(self.task_ex.name,
|
||||||
|
self.task_ex.id,
|
||||||
|
self.task_ex.state,
|
||||||
|
state,
|
||||||
|
state_info)
|
||||||
)
|
)
|
||||||
|
|
||||||
self.task_ex.state = state
|
self.task_ex.state = state
|
||||||
|
@ -243,8 +243,8 @@ class Workflow(object):
|
|||||||
|
|
||||||
wf_trace.info(
|
wf_trace.info(
|
||||||
self.wf_ex,
|
self.wf_ex,
|
||||||
"Execution of workflow '%s' [%s -> %s]"
|
"Workflow '%s' [%s -> %s, msg=%s]"
|
||||||
% (self.wf_ex.workflow_name, cur_state, state)
|
% (self.wf_ex.workflow_name, cur_state, state, state_info)
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
msg = ("Can't change workflow execution state from %s to %s. "
|
msg = ("Can't change workflow execution state from %s to %s. "
|
||||||
|
Loading…
Reference in New Issue
Block a user