ray.workflow.resume_all
ray.workflow.resume_all#
- ray.workflow.resume_all(include_failed: bool = False) List[Tuple[str, ray.ObjectRef]] [source]#
Resume all resumable workflow jobs.
This can be used after cluster restart to resume all tasks.
- Parameters
include_failed – Whether to resume FAILED workflows.
Examples
>>> from ray import workflow >>> failed_job = ... >>> workflow_task = failed_job.bind() >>> output = workflow.run_async( ... workflow_task, workflow_id="failed_job") >>> try: >>> ray.get(output) >>> except Exception: >>> print("JobFailed") >>> jobs = workflow.list_all() >>> assert jobs == [("failed_job", workflow.FAILED)] >>> assert workflow.resume_all( ... include_failed=True).get("failed_job") is not None
- Returns
A list of (workflow_id, returned_obj_ref) resumed.
PublicAPI (alpha): This API is in alpha and may change before becoming stable.