jobq: split RebuildOpts into two rebuild entry points
RebuildOpts held one real parameter (relock) and one single-call-site flag (graceful). The struct justified itself as swap-protection for two positional bools; with graceful out of the signature there is nothing left to swap. graceful stays an internal switch rather than moving to the caller: it re-parents the stop root (StopForUpdate goes from part_of(prebuild) to part_of(signal)) rather than prepending nodes, so a caller could only declare it by being handed the subtree's internals — and that nesting keeps the agent lease continuous across the whole stop. run_meta_lock no longer returns options: both fields were a pure function of the sweep flag its caller had just passed in. 315 tests pass unchanged.
This commit is contained in:
parent
8db1cbd204
commit
05f84191fb
4 changed files with 80 additions and 110 deletions
|
|
@ -26,7 +26,7 @@ use std::sync::Arc;
|
|||
|
||||
use super::model::NodeKind;
|
||||
use super::resource::Resource;
|
||||
use super::templates::{RebuildOpts, rebuild_nodes};
|
||||
use super::templates::rebuild_nodes;
|
||||
use super::{Job, Source, templates};
|
||||
use crate::coordinator::Coordinator;
|
||||
use crate::lifecycle;
|
||||
|
|
@ -118,15 +118,7 @@ fn start_chain(b: &Job, agent: &str, running: bool, stale: bool) {
|
|||
// Rebuild subtree chained behind the `SetWanted` head. `MetaSync`,
|
||||
// `Prebuild` + `Reconcile` are their own group roots (top-level, per
|
||||
// `rebuild_nodes`).
|
||||
rebuild_nodes(
|
||||
b,
|
||||
agent,
|
||||
RebuildOpts {
|
||||
relock: true,
|
||||
graceful: false,
|
||||
},
|
||||
Some(wanted),
|
||||
);
|
||||
rebuild_nodes(b, agent, true, Some(wanted));
|
||||
} else {
|
||||
let _ = b
|
||||
.node(NodeKind::Reconcile {
|
||||
|
|
|
|||
Loading…
Reference in a new issue