Watch
0
0
Fork
You've already forked hyperhive
0

readiness follows a cached store check instead of a constant or a login per probe

This commit is contained in:
maia 2026-11-19 06:07:18 +01:00 • committed by mara
commit b0239914b8

View file

@ -240,7 +240,12 @@ async fn main() -> anyhow::Result<()> {
std::fs::set_permissions(&args.socket, std::fs::Permissions::from_mode(0o666))
.with_context(|| format!("chmod {}", args.socket.display()))?;
tracing::info!(socket = %args.socket.display(), "swarm-logs-auth listening");
health.ready_when(|| true);
// Ready means the store answers: with it down every request is a 401.
let probe = Arc::clone(&responder);
health.ready_while_checked(move || {
let probe = Arc::clone(&probe);
async move { probe.source.check_login().await }
});
let app = axum::Router::new().fallback(handle).with_state(responder);
serve(listener, app, stop).await