Watch
0
0
Fork
You've already forked hyperhive
0

controller: turn an archetype agent into a custom one

This commit is contained in:
atlas 2026-11-01 12:02:38 +01:00 • committed by mara
commit 0737798d78

View file

@ -472,6 +472,21 @@ pub(crate) async fn get_agents_status(
row.needs_login = login.get(&row.name);
}
}
// Absent on a failed read, like `wanted`: one unreadable bucket
// must not blank the roster.
if let Some(reader) = state.status.as_ref() {
match agent_archetype::of_agents(&reader.queue_client(), &rows).await {
Ok(mut archetypes) => {
for row in &mut rows {
row.archetype = archetypes.remove(&row.name);
}
}
Err(e) => tracing::warn!(
error = %format!("{e:#}"),
"reading the agent archetypes failed; rows show none"
),
}
}
Ok(Json(rows))
}
Err(e) => {
@ -1800,6 +1815,7 @@ mod tests {
config_pr: None,
wanted: None,
needs_login: None,
archetype: None,
}
}