From e8d6c382c594fc18f4fd0bd531d1233f29d5a715 Mon Sep 17 00:00:00 2001 From: Vitalii Solodilov Date: Mon, 12 Feb 2018 04:09:12 +0400 Subject: [PATCH] Correction of comments for the #539039 review Change-Id: Id76c20d2da20c362ca94727e5c5dea2e19ed6b6d Signed-off-by: Vitalii Solodilov --- mistral/engine/action_queue.py | 3 +-- mistral/engine/policies.py | 3 ++- mistral/tests/unit/engine/test_policies.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mistral/engine/action_queue.py b/mistral/engine/action_queue.py index d527d6ccc..1a92d46ba 100644 --- a/mistral/engine/action_queue.py +++ b/mistral/engine/action_queue.py @@ -57,8 +57,7 @@ def _process_queue(queue): for operation, args in queue: if operation == _RUN_ACTION: - action_ex, action_def, target, execution_context, \ - timeout = args + action_ex, action_def, target, execution_context, timeout = args executor.run_action( action_ex.id, diff --git a/mistral/engine/policies.py b/mistral/engine/policies.py index 42890cdaf..08e378063 100644 --- a/mistral/engine/policies.py +++ b/mistral/engine/policies.py @@ -28,8 +28,9 @@ import six _CONTINUE_TASK_PATH = 'mistral.engine.policies._continue_task' _COMPLETE_TASK_PATH = 'mistral.engine.policies._complete_task' -_FAIL_IF_INCOMPLETE_TASK_PATH = \ +_FAIL_IF_INCOMPLETE_TASK_PATH = ( 'mistral.engine.policies._fail_task_if_incomplete' +) def _log_task_delay(task_ex, delay_sec): diff --git a/mistral/tests/unit/engine/test_policies.py b/mistral/tests/unit/engine/test_policies.py index c65a54f3d..c11352512 100644 --- a/mistral/tests/unit/engine/test_policies.py +++ b/mistral/tests/unit/engine/test_policies.py @@ -1437,7 +1437,7 @@ class PoliciesTest(base.EngineTestCase): self.await_workflow_error(wf_ex.id) def test_action_timeout(self): - wb = """--- + wf_text = """--- version: '2.0' wf1: tasks: @@ -1446,7 +1446,7 @@ class PoliciesTest(base.EngineTestCase): timeout: 2 """ - wf_service.create_workflows(wb) + wf_service.create_workflows(wf_text) wf_ex = self.engine.start_workflow('wf1') with db_api.transaction():