Merge "Removing redundant wf_ex_id parameter for rerun across the code"
This commit is contained in:
commit
88b399449b
|
@ -174,7 +174,6 @@ class TasksController(rest.RestController):
|
||||||
)
|
)
|
||||||
|
|
||||||
rpc.get_engine_client().rerun_workflow(
|
rpc.get_engine_client().rerun_workflow(
|
||||||
wf_ex.id,
|
|
||||||
task_ex.id,
|
task_ex.id,
|
||||||
reset=reset,
|
reset=reset,
|
||||||
env=env
|
env=env
|
||||||
|
|
|
@ -180,12 +180,10 @@ class EngineServer(object):
|
||||||
|
|
||||||
return self._engine.pause_workflow(execution_id)
|
return self._engine.pause_workflow(execution_id)
|
||||||
|
|
||||||
def rerun_workflow(self, rpc_ctx, wf_ex_id, task_ex_id,
|
def rerun_workflow(self, rpc_ctx, task_ex_id, reset=True, env=None):
|
||||||
reset=True, env=None):
|
|
||||||
"""Receives calls over RPC to rerun workflows on engine.
|
"""Receives calls over RPC to rerun workflows on engine.
|
||||||
|
|
||||||
:param rpc_ctx: RPC request context.
|
:param rpc_ctx: RPC request context.
|
||||||
:param wf_ex_id: Workflow execution id.
|
|
||||||
:param task_ex_id: Task execution id.
|
:param task_ex_id: Task execution id.
|
||||||
:param reset: If true, then purge action execution for the task.
|
:param reset: If true, then purge action execution for the task.
|
||||||
:param env: Environment variables to update.
|
:param env: Environment variables to update.
|
||||||
|
@ -194,10 +192,10 @@ class EngineServer(object):
|
||||||
|
|
||||||
LOG.info(
|
LOG.info(
|
||||||
"Received RPC request 'rerun_workflow'[rpc_ctx=%s, "
|
"Received RPC request 'rerun_workflow'[rpc_ctx=%s, "
|
||||||
"wf_ex_id=%s, task_ex_id=%s]" % (rpc_ctx, wf_ex_id, task_ex_id)
|
"task_ex_id=%s]" % (rpc_ctx, task_ex_id)
|
||||||
)
|
)
|
||||||
|
|
||||||
return self._engine.rerun_workflow(wf_ex_id, task_ex_id, reset, env)
|
return self._engine.rerun_workflow(task_ex_id, reset, env)
|
||||||
|
|
||||||
def resume_workflow(self, rpc_ctx, wf_ex_id, env=None):
|
def resume_workflow(self, rpc_ctx, wf_ex_id, env=None):
|
||||||
"""Receives calls over RPC to resume workflows on engine.
|
"""Receives calls over RPC to resume workflows on engine.
|
||||||
|
@ -385,13 +383,12 @@ class EngineClient(base.Engine):
|
||||||
)
|
)
|
||||||
|
|
||||||
@wrap_messaging_exception
|
@wrap_messaging_exception
|
||||||
def rerun_workflow(self, wf_ex_id, task_ex_id, reset=True, env=None):
|
def rerun_workflow(self, task_ex_id, reset=True, env=None):
|
||||||
"""Rerun the workflow.
|
"""Rerun the workflow.
|
||||||
|
|
||||||
This method reruns workflow with the given execution id
|
This method reruns workflow with the given execution id
|
||||||
at the specific task execution id.
|
at the specific task execution id.
|
||||||
|
|
||||||
:param wf_ex_id: Workflow execution id.
|
|
||||||
:param task_ex_id: Task execution id.
|
:param task_ex_id: Task execution id.
|
||||||
:param reset: If true, then reset task execution state and purge
|
:param reset: If true, then reset task execution state and purge
|
||||||
action execution for the task.
|
action execution for the task.
|
||||||
|
@ -402,7 +399,6 @@ class EngineClient(base.Engine):
|
||||||
return self._client.call(
|
return self._client.call(
|
||||||
auth_ctx.ctx(),
|
auth_ctx.ctx(),
|
||||||
'rerun_workflow',
|
'rerun_workflow',
|
||||||
wf_ex_id=wf_ex_id,
|
|
||||||
task_ex_id=task_ex_id,
|
task_ex_id=task_ex_id,
|
||||||
reset=reset,
|
reset=reset,
|
||||||
env=env
|
env=env
|
||||||
|
|
|
@ -184,7 +184,6 @@ class TestTasksController(base.APITest):
|
||||||
self.assertDictEqual(TASK, resp.json)
|
self.assertDictEqual(TASK, resp.json)
|
||||||
|
|
||||||
rpc.EngineClient.rerun_workflow.assert_called_with(
|
rpc.EngineClient.rerun_workflow.assert_called_with(
|
||||||
WF_EX.id,
|
|
||||||
TASK_EX.id,
|
TASK_EX.id,
|
||||||
reset=params['reset'],
|
reset=params['reset'],
|
||||||
env=None
|
env=None
|
||||||
|
@ -243,7 +242,6 @@ class TestTasksController(base.APITest):
|
||||||
self.assertDictEqual(TASK, resp.json)
|
self.assertDictEqual(TASK, resp.json)
|
||||||
|
|
||||||
rpc.EngineClient.rerun_workflow.assert_called_with(
|
rpc.EngineClient.rerun_workflow.assert_called_with(
|
||||||
WF_EX.id,
|
|
||||||
TASK_EX.id,
|
TASK_EX.id,
|
||||||
reset=params['reset'],
|
reset=params['reset'],
|
||||||
env=json.loads(params['env'])
|
env=json.loads(params['env'])
|
||||||
|
|
Loading…
Reference in New Issue