swarm-queue-based lifecycle notices, replacing push_todo(MANAGER_AGENT)

This commit is contained in:
damocles 2026-08-16 15:58:45 +02:00 committed by mara
commit e44ea9d8d4
12 changed files with 388 additions and 142 deletions

View file

@ -118,7 +118,7 @@ async fn handle_restart_infra(
}
}
/// `Kill` — kill a container, unregister it, notify the manager. The caller
/// `Kill` — kill a container, unregister it, notify the swarm. The caller
/// must be an ancestor of `name` in the topology.
pub(super) async fn handle_kill(coord: &Arc<Coordinator>, agent: &str, name: &str) -> Response {
if let Some(err) = require_descendant(agent, name, "kill") {
@ -138,16 +138,13 @@ pub(super) async fn handle_kill(coord: &Arc<Coordinator>, agent: &str, name: &st
.await;
match result {
Ok(()) => {
let _ = coord
.push_todo(
hive_sh4re::manager::MANAGER_AGENT,
"core",
Some(format!("killed:{name}")),
format!("agent '{name}' killed"),
None,
false,
)
.await;
crate::swarm_notices::notify(
"core",
Some(format!("killed:{name}")),
format!("agent '{name}' killed"),
None,
)
.await;
Response::Ok
}
Err(e) => Response::Err {