diff --git a/v2/robotmk/src/bin/scheduler/main.rs b/v2/robotmk/src/bin/scheduler/main.rs index cadf23a8..f6a799c7 100644 --- a/v2/robotmk/src/bin/scheduler/main.rs +++ b/v2/robotmk/src/bin/scheduler/main.rs @@ -48,7 +48,7 @@ fn run() -> Result<()> { setup::general::setup(&global_config, &suites).context("General setup failed")?; debug!("General setup completed"); - write_state(&results::SchedulerState::RCCSetup, &global_config)?; + write_phase(&results::SchedulerPhase::RCCSetup, &global_config)?; let suites = setup::rcc::setup(&global_config, suites).context("RCC-specific setup failed")?; debug!("RCC-specific setup completed"); @@ -57,8 +57,8 @@ fn run() -> Result<()> { } info!("Starting environment building"); - write_state( - &results::SchedulerState::EnvironmentBuilding, + write_phase( + &results::SchedulerPhase::EnvironmentBuilding, &global_config, )?; let suites = environment::build_environments(&global_config, suites)?; @@ -69,16 +69,16 @@ fn run() -> Result<()> { } info!("Starting suite scheduling"); - write_state(&results::SchedulerState::Scheduling, &global_config)?; + write_phase(&results::SchedulerPhase::Scheduling, &global_config)?; scheduling::scheduler::run_suites_and_cleanup(&global_config, &suites) } -fn write_state( - state: &results::SchedulerState, +fn write_phase( + state: &results::SchedulerPhase, global_config: &internal_config::GlobalConfig, ) -> Result<()> { state.write( - global_config.results_directory.join("scheduler_state.json"), + global_config.results_directory.join("scheduler_phase.json"), &global_config.results_directory_locker, ) } diff --git a/v2/robotmk/src/bin/scheduler/results.rs b/v2/robotmk/src/bin/scheduler/results.rs index 60ffd2a9..e2104228 100644 --- a/v2/robotmk/src/bin/scheduler/results.rs +++ b/v2/robotmk/src/bin/scheduler/results.rs @@ -13,15 +13,15 @@ pub fn suite_results_directory(results_directory: &Utf8Path) -> Utf8PathBuf { } #[derive(Serialize)] -pub enum SchedulerState { +pub enum SchedulerPhase { RCCSetup, EnvironmentBuilding, Scheduling, } -impl WriteSection for SchedulerState { +impl WriteSection for SchedulerPhase { fn name() -> &'static str { - "robotmk_scheduler_state" + "robotmk_scheduler_phase" } }