Hi,
We have this flow that runs continuously.
Each run is about 1 minute, and when one finishes, another one starts right away.
We are using the Prefect client to get all the completed runs that finished in the last 10 minutes:
async def monitor_realtime_sync():
start_time = datetime.now() - timedelta(minutes=10)
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)
But we are getting no results. Weirdly enough, if we try to set the time range to the last month (which is 43800 minutes), then we do see the results:
It seems like the API returns flow runs which are about 1 month old. Any idea why we are not getting fresh runs?