refactor(config)!: Move scheduler out of device_manager

Due to changes made in mlua the new scheduler is much simpler. It also
had no real business being part of the device manager, so it has now been
moved to be part of the returned config.
This commit is contained in:
2025-10-17 04:29:14 +02:00
parent 948380ea9b
commit 1ffccd955c
13 changed files with 224 additions and 138 deletions

View File

@@ -6,6 +6,7 @@ use std::process;
use ::config::{Environment, File};
use automation::config::{Config, Setup};
use automation::schedule::start_scheduler;
use automation::secret::EnvironmentSecretFile;
use automation::version::VERSION;
use automation::web::{ApiError, User};
@@ -142,6 +143,8 @@ async fn app() -> anyhow::Result<()> {
device_manager.add(device).await;
}
start_scheduler(config.schedule).await?;
// Create google home fulfillment route
let fulfillment = Router::new().route("/google_home", post(fulfillment));