Unverified Commit e5c109d8 authored by Yan Ru Pei's avatar Yan Ru Pei Committed by GitHub
Browse files

fix: remove metric publisher tight loop (#4028)


Signed-off-by: default avatarPeaBrane <yanrpei@gmail.com>
parent 89bb3fe9
......@@ -860,6 +860,12 @@ impl WorkerMetricsPublisher {
{
tracing::warn!("Failed to publish metrics over NATS: {}", e);
}
// Reset timer to pending state to avoid tight loop
// It will be reset to 1ms when metrics actually change
publish_timer.as_mut().reset(
tokio::time::Instant::now() + tokio::time::Duration::from_secs(3600)
);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment