Gemma
03/11/2024, 7:28 PMPREFECT_API_SERVICES_LATE_RUNS_AFTER_SECONDS
on the worker to be 30 minutes (basically I just need the notification if it's REALLY late), however, we are getting notified after a couple of seconds of the run attempting to start. What am I missing?Gemma
03/11/2024, 7:28 PM# prefect config view
18:09:58.077 | DEBUG | prefect.profiles - Using profile 'worker'
PREFECT_API_SERVICES_LATE_RUNS_AFTER_SECONDS='0:30:00' (from profile)
Nate
03/11/2024, 7:30 PMPREFECT_API_SERVICES_LATE_RUNS_AFTER_SECONDS
is a server-side configuration (since it affects the loop service that marks flow runs as late), so you'd need to set it there (it won't have an effect if you just set it where the worker runs)Gemma
03/11/2024, 7:49 PMprefect profile create worker
prefect profile use worker
...
prefect config set PREFECT_API_SERVICES_LATE_RUNS_AFTER_SECONDS=1800
...
WORK_POOL_NAME=${ENV}-work-pool
prefect work-pool create --type process "$WORK_POOL_NAME" || true
prefect work-pool set-concurrency-limit "$WORK_POOL_NAME" 5
prefect worker start --pool "$WORK_POOL_NAME"
Nate
03/11/2024, 8:12 PMNate
03/11/2024, 8:12 PMPREFECT_API_SERVICES_LATE_RUNS_AFTER_SECONDS
for Prefect Cloud since we run that 🙂)Gemma
03/11/2024, 8:26 PMNate
03/11/2024, 8:35 PMhow do I configure (within Prefect Cloud) what gets flagged as a “late” run?short answer is that you do not. We run a service in Prefect Cloud that’s responsible for marking flow runs as late (that’s what I meant earlier by mentioning that its a server-side setting) if you just need to be notified only after flow runs have been stuck in Late for 30 minutes, you could just change your automation from looking at a flow run entering
Late
to looking for flow runs that stay in Late
for 30 minutes with something like thisGemma
03/12/2024, 8:54 AMNate
03/12/2024, 2:58 PM