Files
nuchat/src/routes/shutdown.rs
Fergus Molloy 77ea0144cf
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 9s
remove separate ui service, serve ui with backend
2025-07-18 01:54:26 +01:00

9 lines
266 B
Rust

use std::sync::mpsc;
use tracing::{Level, event};
#[allow(clippy::unused_async)]
pub async fn shutdown(tx: mpsc::Sender<bool>) {
event!(Level::INFO, "Shutdown request received, stopping server...");
tx.send(true).expect("failed to send shutdown signal");
}