| 502 | class 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): |