Skip to content

Commit

Permalink
Scheduler main: Check for cancellation between base setup and setup s…
Browse files Browse the repository at this point in the history
…teps

Barely makes a difference but is the correct thing to do.
  • Loading branch information
jherbel committed Nov 27, 2024
1 parent 8aab0a1 commit 714d13a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/bin/scheduler/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ fn run() -> Result<(), Terminate> {
setup::base_directories::setup(&global_config, &plans)?;
info!("Base setup completed");

if global_config.cancellation_token.is_cancelled() {
return Err(Terminate::Cancelled);
}

write_phase(&SchedulerPhase::Setup, &global_config)?;
let (plans, setup_failures) = setup::steps::run::run(&global_config, plans)?;
write_setup_failures(setup_failures.into_iter(), &global_config)?;
Expand Down

0 comments on commit 714d13a

Please sign in to comment.