<@ULVA73B9P> Is there a straightforward way of cle...
# ask-marvin
n
@Marvin Is there a straightforward way of clearing out all late and pending flow runs?
m
There are a couple of methods you could consider to clear out all late and pending flow runs: 1. For workers and agents, upon receiving a SIGTERM, they should complete any ongoing flow runs before terminating the process. Stopping an agent or worker executing flow runs should be safe, provided they have sufficient time to finish their current tasks. In infrastructure such as Kubernetes, where flow run execution occurs outside the agent or worker, the worst-case scenario is that the flow crashes or becomes unresponsive, leaving it in a running state, as the agent or worker is unavailable to detect the failure. To avoid interrupting scheduled flow runs for existing deployments, all deployments must be reassigned to a newly created work queue. Alternatively, it might be simpler to initiate a new agent or worker on the existing work queue and then decommission the old worker. One could pause the work queue for a few minutes while it is going through the “maintenance” of stopping one agent and starting another. source 2. There's also a discussion on deleting all flow runs using the CLI. You can check it out here for more details. Please note that these methods should be used with caution as they may interrupt ongoing tasks and could potentially leave flows in a running state if the agent or worker is unavailable to detect the failure.
with a slight change to the example you should be able to clear them all out
n
Very cool, appreciate it! Our internally hosted VM is experiencing network issues so a ton have accumulated, this should be very helpful.