Small engine bugfixing/refactoring
Change-Id: Iba8c237dc93cf63ad4877b321851fa52c735163b
This commit is contained in:
parent
972999f81d
commit
b9f49cc28a
@ -85,11 +85,11 @@ class Engine(object):
|
||||
|
||||
context = copy.copy(context) if context else {}
|
||||
|
||||
db_api.start_tx()
|
||||
|
||||
WORKFLOW_TRACE.info("New execution started - [workbook_name = '%s', "
|
||||
"task_name = '%s']" % (workbook_name, task_name))
|
||||
|
||||
db_api.start_tx()
|
||||
|
||||
# Persist execution and tasks in DB.
|
||||
try:
|
||||
workbook = self._get_workbook(workbook_name)
|
||||
@ -111,9 +111,9 @@ class Engine(object):
|
||||
|
||||
db_api.commit_tx()
|
||||
except Exception as e:
|
||||
LOG.exception("Failed to create necessary DB objects.")
|
||||
raise exc.EngineException("Failed to create necessary DB objects:"
|
||||
" %s" % e)
|
||||
msg = "Failed to create necessary DB objects: %s" % e
|
||||
LOG.exception(msg)
|
||||
raise exc.EngineException(msg)
|
||||
finally:
|
||||
db_api.end_tx()
|
||||
|
||||
@ -214,9 +214,9 @@ class Engine(object):
|
||||
|
||||
db_api.commit_tx()
|
||||
except Exception as e:
|
||||
LOG.exception("Failed to create necessary DB objects.")
|
||||
raise exc.EngineException("Failed to create necessary DB objects:"
|
||||
" %s" % e)
|
||||
msg = "Failed to create necessary DB objects: %s" % e
|
||||
LOG.exception(msg)
|
||||
raise exc.EngineException(msg)
|
||||
finally:
|
||||
db_api.end_tx()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user