1 2 3 4 5 6 7 8 9 10 11
async fn watch() -> eyre::Result<()> { // let (shutdown_tx, shutdown_rx) = tokio::sync::watch::channel(false); // // tokio::spawn(async move { // tokio::signal::ctrl_c().await.unwrap(); // tracing::warn!("received ctr-c"); // tracing::info!("initiate graceful shutdown"); // shutdown_tx.send(true).unwrap(); // }); Ok(()) }