ray.workflow.list_all(status_filter: Optional[Union[ray.workflow.common.WorkflowStatus, str, Set[Union[ray.workflow.common.WorkflowStatus, str]]]] = None) List[Tuple[str, ray.workflow.common.WorkflowStatus]][source]#

List all workflows matching a given status filter. When returning “RESUMEABLE” workflows, the workflows that was running ranks before the workflow that was pending in the result list.


status_filter – If given, only returns workflow with that status. This can be a single status or set of statuses. The string form of the status is also acceptable, i.e., “RUNNING”/”FAILED”/”SUCCESSFUL”/”CANCELED”/”RESUMABLE”/”PENDING”.


>>> from ray import workflow
>>> long_running_job = ... 
>>> workflow_task = long_running_job.bind() 
>>> wf = workflow.run_async(workflow_task, 
...     workflow_id="long_running_job")
>>> jobs = workflow.list_all() 
>>> assert jobs == [ ("long_running_job", workflow.RUNNING) ] 
>>> ray.get(wf) 
>>> jobs = workflow.list_all({workflow.RUNNING}) 
>>> assert jobs == [] 
>>> jobs = workflow.list_all(workflow.SUCCESSFUL) 
>>> assert jobs == [ 
...     ("long_running_job", workflow.SUCCESSFUL)]

A list of tuple with workflow id and workflow status

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