Hristo Papazov
06/04/2024, 11:22 PM.../deployments/get_scheduled_flow_runs
Nate
06/05/2024, 12:23 AMread_flow_runs
client method (or the endpoint it is using, POST /flow_runs/filter
) like this
In [1]: from prefect import get_client
In [2]: from prefect.client.schemas.filters import FlowRunFilter
In [3]: async with get_client() as client:
...: runs = await client.read_flow_runs(
...: flow_run_filter=FlowRunFilter(
...: state=dict(name=dict(any_=["Failed", "Crashed"])),
...: deployment_id=dict(any_=["d17fe4e4-382a-4d34-9a8d-c6a39407103c"])
...: )
...: )
...:
In [4]: len(runs)
Out[4]: 3
In [5]: assert all(run.state.name in ("Failed", "Crashed") for run in runs)
more examples hereHristo Papazov
06/05/2024, 1:03 PMPOST /flow_runs/filter-minimal
. I also need to get work queue/pool concurrency limits and looks like the response contains that information. In the API documentation for Read Flow Runs Minimal I see this note A flow runs filter that excludes full state data -- and possibly other data in the future -- for improved performance.
Do you know if work_queue and work_pool data could be excluded in the future?