Watch
0
0
Fork
You've already forked hyperhive
0

swarm daemons: opt-in /healthz and /readyz listener, and /readyz on the controller

This commit is contained in:
atlas 2026-11-18 13:52:36 +01:00 • committed by mara
commit c21b158884

View file

@ -107,6 +107,11 @@ async fn main() -> Result<()> {
let full = format!("{PREFIX}_{name}");
std::env::var(&full).with_context(|| format!("{full} is unset"))
};
let health = swarm_secret_client::health::Health::from_env(
&format!("{PREFIX}_HEALTH_ADDR"),
stop.clone(),
)
.await?;
let client_id = var("OIDC_CLIENT_ID")?;
let metrics = Arc::new(Metrics::from_env());
let logins = Arc::new(login::Logins::new(
@ -134,13 +139,16 @@ async fn main() -> Result<()> {
.map(PathBuf::from),
})
.await?;
swarm_queue_client::ready_when_connected(&health, &queue);
// No queue group: a running login lives in this process's memory, so
// every step for it has to reach this process.
let mut requests = queue
.subscribe(SUBJECT)
.await
.with_context(|| format!("subscribing to {SUBJECT}"))?
.take_until(stop.clone());
let mut requests = health.beating(
queue
.subscribe(SUBJECT)
.await
.with_context(|| format!("subscribing to {SUBJECT}"))?
.take_until(stop.clone()),
);
tracing::info!(subject = SUBJECT, "claude login minter: awaiting logins");
let mut in_flight = swarm_secret_client::InFlight::new();