Skip to content

Add feature to disallow queueing of flow runs #19313

@NodeJSmith

Description

@NodeJSmith

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAn improvement of an existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions