server: fix systemd reload notifs
All checks were successful
Build and test / check-license (push) Successful in 1m0s
Build and test / check (push) Successful in 1m52s
Build and test / build (push) Successful in 3m32s
Build and test / test (push) Successful in 3m41s
Build and test / docs (push) Successful in 5m31s

This commit is contained in:
2026-01-12 16:26:20 +09:00
parent a141e97beb
commit 902970f271

View File

@@ -295,7 +295,15 @@ impl Supervisor {
pub async fn reload(&self) -> anyhow::Result<()> {
#[cfg(target_os = "linux")]
sd_notify::notify(false, &[sd_notify::NotifyState::Reloading])?;
sd_notify::notify(
false,
&[
sd_notify::NotifyState::Reloading,
sd_notify::NotifyState::monotonic_usec_now()
.expect("Failed to get monotonic time to send to systemd while reloading"),
sd_notify::NotifyState::Status("Reloading configuration"),
],
)?;
let previous_config = self.config.lock().await.clone();
self.reload_config().await?;