Merge "Making workflow trace logging more consistent"

This commit is contained in:
Jenkins 2014-04-29 18:00:03 +00:00 committed by Gerrit Code Review
commit cde8a9a23a
2 changed files with 3 additions and 4 deletions

View File

@ -95,8 +95,8 @@ class AbstractEngine(object):
#TODO(rakhmerov): validate state transition
task = db_api.task_get(workbook_name, execution_id, task_id)
wf_trace_msg = "Task '%s', [%s -> %s" % (task['name'],
task['state'], state)
wf_trace_msg = "Task '%s' [%s -> %s" % \
(task['name'], task['state'], state)
wf_trace_msg += ']' if state == states.ERROR \
else ", result = %s]" % result
@ -119,7 +119,7 @@ class AbstractEngine(object):
if execution['state'] != new_exec_state:
wf_trace_msg = \
"Execution '%s', [%s -> %s]" % \
"Execution '%s' [%s -> %s]" % \
(execution_id, execution['state'], new_exec_state)
WORKFLOW_TRACE.info(wf_trace_msg)

View File

@ -30,7 +30,6 @@ WORKFLOW_TRACE = logging.getLogger(cfg.CONF.workflow_trace_log_name)
class Executor(object):
def __init__(self, transport=None):
self.transport = engine.get_transport(transport)
self.engine = client.EngineClient(self.transport)