hivectl: batch QueueNodes polling by id set, drop remaining dag wording

This commit is contained in:
damocles 2026-08-03 20:17:16 +02:00 committed by mara
commit 0c4d56a585
8 changed files with 182 additions and 125 deletions

View file

@ -5,7 +5,7 @@ use std::path::Path;
use anyhow::{Context as _, Result};
use crate::dag_progress::wait_for_dags;
use crate::dag_progress::wait_for_nodes;
use crate::util::render_lifecycle;
pub(crate) async fn stop(
@ -24,7 +24,7 @@ pub(crate) async fn stop(
// watch the already-queued agent DAGs before surfacing the error —
// they run regardless.
let rendered = render_lifecycle(&resp, "stop queued");
wait_for_dags(socket, resp.queued_dags.unwrap_or_default(), no_wait).await?;
wait_for_nodes(socket, resp.queued_dags.unwrap_or_default(), no_wait).await?;
rendered
}
@ -37,7 +37,7 @@ pub(crate) async fn start(
.await
.with_context(|| format!("connect to daemon socket {}", socket.display()))?;
let rendered = render_lifecycle(&resp, "start queued");
wait_for_dags(socket, resp.queued_dags.unwrap_or_default(), no_wait).await?;
wait_for_nodes(socket, resp.queued_dags.unwrap_or_default(), no_wait).await?;
rendered
}
@ -66,6 +66,6 @@ pub(crate) async fn restart(
.await
.with_context(|| format!("connect to daemon socket {}", socket.display()))?;
let rendered = render_lifecycle(&resp, "restart queued");
wait_for_dags(socket, resp.queued_dags.unwrap_or_default(), false).await?;
wait_for_nodes(socket, resp.queued_dags.unwrap_or_default(), false).await?;
rendered
}