chiark / gitweb /
make success_report_interval configuraable
[hippotat.git] / src / reporter.rs
index 7cd5ae751bca8c6cc3406492d1b38515055f9999..24cd6b82822f44756b3b95aafc725e18a4445251 100644 (file)
@@ -34,7 +34,10 @@ impl<'r> Reporter<'r> {
     let now = Instant::now();
     if let Some(rep) = &self.last_report {
       if now - rep.when < match rep.ok {
-        Ok(()) => Duration::from_secs(3600), // xxx config?
+        Ok(()) => match self.ic.success_report_interval {
+          z if z == Duration::default() => return,
+          nonzero => nonzero,
+        },
         Err(()) => self.ic.effective_http_timeout,
       } {
         return