Skip to content

Commit 9a71e5a

Browse files
authored
Merge branch 'main' into spot-schedule-phase-2
2 parents 1277d0c + 883db3b commit 9a71e5a

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

src/crd.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,21 @@ fn default_enabled() -> bool {
264264
}
265265

266266
impl ScheduleSpec {
267+
/// An inactive placeholder schedule (`enabled: false`, no windows) used as
268+
/// the effective schedule for a `spotSchedule`-only `ScheduledMachine`
269+
/// (one with no inline `spec.schedule`). `enabled: false` makes the
270+
/// time-based evaluator return "not active", so a provider-only machine is
271+
/// inert until the spot-schedule resolver composes the provider verdict.
272+
#[must_use]
273+
pub fn inactive_placeholder() -> Self {
274+
Self {
275+
days_of_week: Vec::new(),
276+
hours_of_day: Vec::new(),
277+
timezone: default_timezone(),
278+
enabled: false,
279+
}
280+
}
281+
267282
/// Get the set of active weekday numbers (0=Monday, 6=Sunday)
268283
///
269284
/// # Errors

0 commit comments

Comments
 (0)