Kill Meilisearch with a TERM signal

This commit is contained in:
Kerollmops 2024-12-11 16:27:07 +01:00
parent eaa897d983
commit 04a24a9239
No known key found for this signature in database
GPG key ID: F250A4C4E3AE5F5F
2 changed files with 46 additions and 8 deletions

View file

@ -129,6 +129,11 @@ async fn try_main() -> anyhow::Result<()> {
print_launch_resume(&opt, analytics.clone(), config_read_from);
tokio::spawn(async move {
tokio::signal::ctrl_c().await.unwrap();
std::process::exit(77);
});
run_http(index_scheduler, auth_controller, opt, log_handle, Arc::new(analytics)).await?;
Ok(())