mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-21 00:02:30 +00:00
fix: say nothing about a schedule that was configured to skip runs
This commit is contained in:
@@ -1224,8 +1224,10 @@ async fn fetch_interval_drift(
|
||||
w_id: &str,
|
||||
schedule: &Schedule,
|
||||
) -> Result<Option<IntervalDrift>> {
|
||||
// A schedule that is off is not running behind, it is not running.
|
||||
if !schedule.enabled {
|
||||
// A schedule that is off is not running behind, it is not running. Nor is one
|
||||
// told to skip: a skip handler and `no_flow_overlap` both exist to drop runs, so
|
||||
// for those two the cadence the cron asks for was never the promise.
|
||||
if !schedule.enabled || schedule.no_flow_overlap || schedule.dynamic_skip.is_some() {
|
||||
return Ok(None);
|
||||
}
|
||||
// Query plan: `(workspace_id, runnable_path, created_at DESC)` index, hence the
|
||||
|
||||
@@ -138,15 +138,12 @@
|
||||
| { interval: ScheduleIntervalDrift; queuesNextRunAtStart: boolean }
|
||||
| undefined = $state(undefined)
|
||||
|
||||
// A flow queues its next run when the previous one starts, and so does a script
|
||||
// carrying a skip handler, which is pushed as a single step flow. A retry policy
|
||||
// does not: it is materialized natively onto a plain script job.
|
||||
// A flow queues its next run when the previous one starts, where a script queues it
|
||||
// once the previous one has finished, and the two have different ways out. Only
|
||||
// those two reach here: a schedule set to skip runs is not measured at all.
|
||||
function readDeployedDrift(deployed: Record<string, any>) {
|
||||
deployedDrift = deployed.interval_drift
|
||||
? {
|
||||
interval: deployed.interval_drift,
|
||||
queuesNextRunAtStart: !!deployed.is_flow || deployed.dynamic_skip != undefined
|
||||
}
|
||||
? { interval: deployed.interval_drift, queuesNextRunAtStart: !!deployed.is_flow }
|
||||
: undefined
|
||||
}
|
||||
let tag: string | undefined = $state(undefined)
|
||||
|
||||
Reference in New Issue
Block a user