Watch
0
0
Fork
You've already forked hyperhive
0

log the proxy-credential, cache-miss and users-file passes at info, with counts in the message

This commit is contained in:
atlas 2026-10-28 18:29:53 +01:00 • committed by mara
commit 22522b386a

View file

@ -477,6 +477,7 @@ pub fn spawn(
) {
tokio::spawn(async move {
let metrics = Metrics::global();
tracing::info!("cache miss: pass every {}m", PASS_INTERVAL.as_secs() / 60);
let mut backoff = Backoff::default();
let mut ticker =
tokio::time::interval_at(tokio::time::Instant::now() + PASS_INTERVAL, PASS_INTERVAL);
@ -495,7 +496,10 @@ pub fn spawn(
}
};
match pass(&world, &mut backoff, &metrics, Instant::now()).await {
Ok(sent) => tracing::debug!(rebuilds = sent.len(), "cache miss: pass done"),
Ok(sent) if !sent.is_empty() => {
tracing::info!("cache miss: pass sent {} rebuilds", sent.len());
}
Ok(_) => tracing::debug!("cache miss: pass done, no misses"),
Err(e) => tracing::warn!(error = %format!("{e:#}"), "cache miss: pass failed"),
}
}