Start plugins after start commands

Because stop commands run after plugins' shutdown, so it seems better
that commands embrace ({ plugins }).

Fix outdated comment about aborting on startup.
This commit is contained in:
ppom 2026-02-09 12:00:00 +01:00
commit 62933b55e4
No known key found for this signature in database

View file

@ -152,20 +152,20 @@ async fn daemon_start(
(state, stream_managers)
};
// Finish plugin setup
plugins.finish_setup().await?;
plugins.manager();
// Open socket and run task
let socket = Socket::open(socket).await?;
socket.manager(config, state, shutdown.clone());
// reaction won't abort on startup anymore, we can run start commands
// all core systems started, we can run start commands
*config_started = true;
if !config.start() {
return Err("a start command failed, exiting.".into());
}
// Finish plugin setup
plugins.finish_setup().await?;
plugins.manager();
// Start Stream managers
let stream_task_handles = stream_managers.into_iter().filter_map(|stream_manager| {
let standalone = stream_manager.is_standalone();