Mansour Zayer
01/23/2023, 5:21 PMFlowRunFilter. The problem is that prefect.orion.schemas.filters.FlowRunFilter requires a parameter of type FlowRunFilterState as state But FlowRunFilterState object doesn't exist in the API reference. There's only FlowRunFilterStateType
How can I create such a filter? FlowRunFilter(state=FlowRunFilterState(name='COMPLETED')) (this doesn't work)
Thank youAlix Cook
01/23/2023, 6:15 PMflow_runs = await client.read_flow_runs(
flow_run_filter=FlowRunFilter(
state=FlowRunFilterState(type=FlowRunFilterStateType(any_=[StateType.RUNNING, StateType.PENDING])),
),
sort=FlowRunSort.EXPECTED_START_TIME_DESC,
limit=limit,
offset=offset,
)Mansour Zayer
01/23/2023, 6:51 PMAlix Cook
01/23/2023, 7:37 PMfrom prefect.client import get_client
async with get_client() as client:
.... do stuff....