-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
Describe the current behavior
Lets say I have a flow that runs every five minutes. I pause my work pools to do a deployment or while there is an issue we're troubleshooting. The flow runs stay scheduled and go into Late status. New flow runs continue to be scheduled. After an hour I have 12 runs that are Late and ready to go.
Even if I have a work pool or work queue concurrency of 1, the Late flow runs stay there and will get run ASAP until they are all ran or are manually cancelled (or cancelled through an automation or something). Especially given that this already runs every 5 minutes, there is no need for this, and the non-stop runs could be detrimental (API rate limiting, etc)
Describe the proposed behavior
An option on Deployments for "max_allowed_queued_runs" or "max_late_runs" or something similar. If this is set to 0 then the worker, upon it's regular "check for work/flow runs to cancel" loop, will check if there is a running flow and any Late flows, will cancel the Late ones. Or something similar to that.
Example Use
See above
Additional context
I accept that this could probably be done in an Automation, which I have very little experience in. Even if so, it feels like a high enough QoL benefit that it could be either built in or an example or pre-built automation template could be provided for this.