job_queue: finish reparent call-site swap, delete dead sync path
This commit is contained in:
parent
05b373474a
commit
18745f1a98
8 changed files with 94 additions and 216 deletions
|
|
@ -180,19 +180,17 @@ async fn dispatch(req: &HostRequest, coord: Arc<Coordinator>) -> HostResponse {
|
|||
}
|
||||
HostRequest::SetParent { child, new_parent } => {
|
||||
tracing::info!(%child, ?new_parent, "set_parent");
|
||||
// `reparent_with_notify` wraps `topology::set_parent`
|
||||
// with the three notification messages + the
|
||||
// ContainerView rescan. Idempotent same-parent calls
|
||||
// skip both the messages and the disk write per the
|
||||
// topology fast-path.
|
||||
coord
|
||||
.reparent_with_notify(
|
||||
child.as_str(),
|
||||
new_parent.as_ref().map(hive_types::Ident::as_str),
|
||||
)
|
||||
.await
|
||||
.map_err(anyhow::Error::msg)?;
|
||||
HostResponse::success()
|
||||
// Fire-and-forget, like every other queue-backed op:
|
||||
// submit returns a DAG id immediately, the caller polls
|
||||
// `QueueDag` (`hivectl`'s wait/progress loop) for the
|
||||
// outcome instead of blocking here on the commit.
|
||||
let id = crate::job_queue::submit::reparent(
|
||||
&coord,
|
||||
vec![(child.clone(), new_parent.clone())],
|
||||
crate::job_queue::Source::Manual,
|
||||
"manual set-parent via hivectl".to_owned(),
|
||||
);
|
||||
HostResponse::queued(vec![id])
|
||||
}
|
||||
HostRequest::SetResourceLimits {
|
||||
name,
|
||||
|
|
|
|||
Loading…
Reference in a new issue