https://prefect.io logo
Title
y

Yaron Levi

03/06/2023, 2:55 PM
Any idea how to use the FlowFilter to get runs withs created_at between two dates?
client.read_flow_runs(flow_filter=FlowFilter(created_at>xxx, created_at<xxx, name={"any_": ["flow1"]}), limit=5)
1
Found it: async def monitor_realtime_sync(): start_time = datetime.now() - timedelta(minutes=43800) async with get_client() as client: r = await client.read_flow_runs( flow_filter=FlowFilter(name={“any_“: [“sync_snowflake_realtime”]}), limit=5, flow_run_filter=FlowRunFilter( state=FlowRunFilterState( type=FlowRunFilterStateName(any_=[“COMPLETED”]) ), start_time=FlowRunFilterStartTime( after_=start_time ) )) for flow in r: print(flow.name, flow.flow_id, flow.created)
:party-parrot: 1