Browse Source

Remove ad-hoc program modification

Now we can run from MQTT to test
master
Alex Mikhalev 4 years ago
parent
commit
f4c82ada2e
  1. 10
      src/main.rs

10
src/main.rs

@ -44,15 +44,7 @@ async fn main() -> Result<()> { @@ -44,15 +44,7 @@ async fn main() -> Result<()> {
let mut section_runner = section_runner::SectionRunner::new(section_interface);
let mut program_runner = program_runner::ProgramRunner::new(section_runner.clone());
let mut 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);
}
}
let programs = database::query_programs(&conn)?;
for prog in programs.values() {
debug!(program = debug(&prog), "read program");

Loading…
Cancel
Save