log the proxy-credential, cache-miss and users-file passes at info, with counts in the message
This commit is contained in:
parent
5e997ebe2e
commit
22522b386a
1 changed files with 15 additions and 6 deletions
|
|
@ -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"),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue