Radish alpha
r
Radicle CI broker
Radicle
Git (anonymous pull)
Log in to clone via SSH
refactor(src/pages.rs): use a Duration instead of plain integer
Lars Wirzenius committed 1 year ago
commit 0bbfebc80da0796f92456f01f814e19886c4ef39
parent f713e4aa6a2d5d90f13c6e32d458c47ecf0add78
1 file changed +6 -2
modified src/pages.rs
@@ -32,7 +32,7 @@ use crate::{

const CSS: &str = include_str!("radicle-ci.css");
const REFERESH_INTERVAL: &str = "300";
-
const UPDATE_INTERVAL: u64 = 60;
+
const UPDATE_INTERVAL: Duration = Duration::from_secs(60);

/// All possible errors returned from the status page module.
#[derive(Debug, thiserror::Error)]
@@ -503,7 +503,11 @@ impl StatusPage {
            if once {
                return Ok(());
            }
-
            sleep(Duration::from_secs(UPDATE_INTERVAL));
+
            info!(
+
                "wait about {} seconds to update HTML report pages again",
+
                UPDATE_INTERVAL.as_secs()
+
            );
+
            sleep(UPDATE_INTERVAL);
        })
    }