fix: ensure authenticated graceful shutdown exits process and sort live activity feed by timestamp descending

This commit is contained in:
Riz Ashraf committed 2026-10-04 02:55:56 +01:00
1 parent 3efee96230
commit 91d5565141
5 files changed
+46 -22

No files matched your search

+6
View File
@@ -137,6 +137,12 @@ pub fn create_router(app_state: Arc<AppState>) -> Router {
if let Some(tx) = state.shutdown_tx.lock().unwrap().take() {
let _ = tx.send(());
}
tokio::spawn(async move {
tokio::time::sleep(std::time::Duration::from_millis(200)).await;
std::process::exit(0);
});
(axum::http::StatusCode::OK, "Shutting down...").into_response()
},
),