clean up shutdown events

The shutdown function is called in exactly one place, and that place
has a better log message, so we'll just delete the extra one.
This commit is contained in:
Charles Hall 2024-06-18 22:54:33 -07:00
parent 12b0fb7f91
commit 601c2ed3e5
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
2 changed files with 2 additions and 4 deletions

View file

@ -508,7 +508,7 @@ async fn shutdown_signal(handles: Vec<ServerHandle>) {
() = terminate => { sig = "SIGTERM"; }, () = terminate => { sig = "SIGTERM"; },
} }
warn!("Received {}, shutting down...", sig); warn!(signal = %sig, "shutting down due to signal");
services().globals.shutdown(); services().globals.shutdown();

View file

@ -29,7 +29,7 @@ use ruma::{
UserId, UserId,
}; };
use tokio::sync::{broadcast, Mutex, RwLock, Semaphore}; use tokio::sync::{broadcast, Mutex, RwLock, Semaphore};
use tracing::{error, info, Instrument}; use tracing::{error, Instrument};
use trust_dns_resolver::TokioAsyncResolver; use trust_dns_resolver::TokioAsyncResolver;
use crate::{api::server_server::FedDest, services, Config, Error, Result}; use crate::{api::server_server::FedDest, services, Config, Error, Result};
@ -509,8 +509,6 @@ impl Service {
pub(crate) fn shutdown(&self) { pub(crate) fn shutdown(&self) {
self.shutdown.store(true, atomic::Ordering::Relaxed); self.shutdown.store(true, atomic::Ordering::Relaxed);
// On shutdown
info!(target: "shutdown-sync", "Received shutdown notification, notifying sync helpers...");
services().globals.rotate.fire(); services().globals.rotate.fire();
} }
} }