|
|
@ -44,15 +44,7 @@ async fn main() -> Result<()> { |
|
|
|
let mut section_runner = section_runner::SectionRunner::new(section_interface); |
|
|
|
let mut section_runner = section_runner::SectionRunner::new(section_interface); |
|
|
|
let mut program_runner = program_runner::ProgramRunner::new(section_runner.clone()); |
|
|
|
let mut program_runner = program_runner::ProgramRunner::new(section_runner.clone()); |
|
|
|
|
|
|
|
|
|
|
|
let mut programs = database::query_programs(&conn)?; |
|
|
|
let programs = database::query_programs(&conn)?; |
|
|
|
|
|
|
|
|
|
|
|
// TEMP: just so the program runs right away
|
|
|
|
|
|
|
|
if let Some(prog) = programs.get_mut(&1) { |
|
|
|
|
|
|
|
let prog_mut = Arc::make_mut(prog); |
|
|
|
|
|
|
|
if let Some(first_time) = prog_mut.schedule.times.get_mut(0) { |
|
|
|
|
|
|
|
*first_time = chrono::Local::now().time() + chrono::Duration::seconds(5); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for prog in programs.values() { |
|
|
|
for prog in programs.values() { |
|
|
|
debug!(program = debug(&prog), "read program"); |
|
|
|
debug!(program = debug(&prog), "read program"); |
|
|
|