Merge remote-tracking branch 'vladexa/monotonic-usec'
This commit is contained in:
@@ -65,7 +65,7 @@ pub(crate) async fn start(server: Arc<Server>) -> Result<Arc<Services>> {
|
|||||||
let services = Services::build(server).await?.start().await?;
|
let services = Services::build(server).await?.start().await?;
|
||||||
|
|
||||||
#[cfg(all(feature = "systemd", target_os = "linux"))]
|
#[cfg(all(feature = "systemd", target_os = "linux"))]
|
||||||
sd_notify::notify(true, &[sd_notify::NotifyState::Ready])
|
sd_notify::notify(false, &[sd_notify::NotifyState::Ready])
|
||||||
.expect("failed to notify systemd of ready state");
|
.expect("failed to notify systemd of ready state");
|
||||||
|
|
||||||
debug!("Started");
|
debug!("Started");
|
||||||
|
|||||||
@@ -49,13 +49,16 @@ impl Deref for Service {
|
|||||||
fn handle_reload(&self) -> Result {
|
fn handle_reload(&self) -> Result {
|
||||||
if self.server.config.config_reload_signal {
|
if self.server.config.config_reload_signal {
|
||||||
#[cfg(all(feature = "systemd", target_os = "linux"))]
|
#[cfg(all(feature = "systemd", target_os = "linux"))]
|
||||||
sd_notify::notify(true, &[sd_notify::NotifyState::Reloading])
|
sd_notify::notify(false, &[
|
||||||
.expect("failed to notify systemd of reloading state");
|
sd_notify::NotifyState::Reloading,
|
||||||
|
sd_notify::NotifyState::monotonic_usec_now().expect("failed to get monotonic time"),
|
||||||
|
])
|
||||||
|
.expect("failed to notify systemd of reloading state");
|
||||||
|
|
||||||
self.reload(iter::empty())?;
|
self.reload(iter::empty())?;
|
||||||
|
|
||||||
#[cfg(all(feature = "systemd", target_os = "linux"))]
|
#[cfg(all(feature = "systemd", target_os = "linux"))]
|
||||||
sd_notify::notify(true, &[sd_notify::NotifyState::Ready])
|
sd_notify::notify(false, &[sd_notify::NotifyState::Ready])
|
||||||
.expect("failed to notify systemd of ready state");
|
.expect("failed to notify systemd of ready state");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user