ray.workflow.resume_all#

ray.workflow.resume_all(include_failed: bool = False) List[Tuple[str, ray._raylet.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

@ray.remote
def failed_job():
    raise ValueError()

workflow_task = failed_job.bind()
output = workflow.run_async(
    workflow_task, workflow_id="failed_job")
try:
    ray.get(output)
except Exception:
    print("JobFailed")

assert workflow.get_status("failed_job") == workflow.FAILED
print(workflow.resume_all(include_failed=True))
JobFailed
[('failed_job', ObjectRef(...))]
Returns:

A list of (workflow_id, returned_obj_ref) resumed.

PublicAPI (alpha): This API is in alpha and may change before becoming stable.