Add gracefull shutdown

This commit is contained in:
2024-01-08 00:58:08 +01:00
parent 8431b27ce0
commit da6f5161fe
2 changed files with 16 additions and 3 deletions

View File

@@ -98,7 +98,7 @@ impl BotsManager {
}
pub async fn start(running: Arc<AtomicBool>) {
start_axum_server().await;
start_axum_server(running.clone()).await;
let mut interval = time::interval(Duration::from_secs(5));