MCPcopy Index your code
hub / github.com/StackStorm/st2 / re_run

Method re_run

st2client/st2client/models/core.py:504–535  ·  view source on GitHub ↗
(
        self,
        execution_id,
        parameters=None,
        tasks=None,
        no_reset=None,
        delay=0,
        **kwargs,
    )

Source from the content-addressed store, hash-verified

502class ExecutionResourceManager(ResourceManager):
503 @add_auth_token_to_kwargs_from_env
504 def re_run(
505 self,
506 execution_id,
507 parameters=None,
508 tasks=None,
509 no_reset=None,
510 delay=0,
511 **kwargs,
512 ):
513 url = "/%s/%s/re_run" % (self.resource.get_url_path_name(), execution_id)
514
515 tasks = tasks or []
516 no_reset = no_reset or []
517
518 if list(set(no_reset) - set(tasks)):
519 raise ValueError(
520 "List of tasks to reset does not match the tasks to rerun."
521 )
522
523 data = {
524 "parameters": parameters or {},
525 "tasks": tasks,
526 "reset": list(set(tasks) - set(no_reset)),
527 "delay": delay,
528 }
529
530 response = self.client.post(url, data, **kwargs)
531 if response.status_code != http_client.OK:
532 self.handle_error(response)
533
534 instance = self.resource.deserialize(parse_api_response(response))
535 return instance
536
537 @add_auth_token_to_kwargs_from_env
538 def get_output(self, execution_id, output_type=None, **kwargs):

Calls 5

parse_api_responseFunction · 0.85
get_url_path_nameMethod · 0.80
deserializeMethod · 0.80
postMethod · 0.45
handle_errorMethod · 0.45