diff --git a/mistral/engine/tasks.py b/mistral/engine/tasks.py index 8f4d0a371..097b291f0 100644 --- a/mistral/engine/tasks.py +++ b/mistral/engine/tasks.py @@ -404,10 +404,12 @@ class RegularTask(Task): self.notify(None, self.task_ex.state) LOG.debug( - 'Starting task [workflow=%s, task=%s, init_state=%s]', - self.wf_ex.name, + 'Starting task [name=%s, init_state=%s, workflow_name=%s,' + ' execution_id=%s]', self.task_spec.get_name(), - self.task_ex.state + self.task_ex.state, + self.wf_ex.name, + self.wf_ex.id ) self._before_task_start() diff --git a/mistral/services/workflows.py b/mistral/services/workflows.py index 7a49ccb00..383322375 100644 --- a/mistral/services/workflows.py +++ b/mistral/services/workflows.py @@ -25,7 +25,8 @@ LOG = logging.getLogger(__name__) def register_standard_workflows(run_in_tx=True): - LOG.debug("Registering standard workflows") + LOG.debug("Registering standard workflows...") + workflow_paths = utils.get_file_list(STD_WF_PATH) for wf_path in workflow_paths: @@ -45,17 +46,21 @@ def _clear_system_workflow_db(): def sync_db(): - LOG.debug("Syncing db") + LOG.debug("Syncing db...") + with db_api.transaction(): _clear_system_workflow_db() + register_standard_workflows(run_in_tx=False) def create_workflows(definition, scope='private', is_system=False, run_in_tx=True, namespace=''): - LOG.debug("Creating workflows") + LOG.debug("Creating workflows...") + wf_list_spec = spec_parser.get_workflow_list_spec_from_yaml( - definition, validate=True + definition, + validate=True ) db_wfs = []