From 00d41438b97dfc60ace93b6b671a0b8417fbbfab Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Tue, 22 Feb 2022 10:25:40 +0100 Subject: [PATCH] bin: daily-update: use from_millis instead of big nanosecond value Signed-off-by: Thomas Lamprecht --- src/bin/proxmox-daily-update.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/proxmox-daily-update.rs b/src/bin/proxmox-daily-update.rs index 638178d7..8ecd9d3c 100644 --- a/src/bin/proxmox-daily-update.rs +++ b/src/bin/proxmox-daily-update.rs @@ -9,13 +9,13 @@ use proxmox_backup::tools::subscription; async fn wait_for_local_worker(upid_str: &str) -> Result<(), Error> { let upid: pbs_api_types::UPID = upid_str.parse()?; - let sleep_duration = core::time::Duration::new(0, 100_000_000); + let poll_delay = core::time::Duration::from_millis(100); loop { if !proxmox_rest_server::worker_is_active_local(&upid) { break; } - tokio::time::sleep(sleep_duration).await; + tokio::time::sleep(poll_delay).await; } Ok(()) }