jobq: the core alias is a JobBuilder, not a Job
A JobBuilder holds pending nodes that are not in the graph yet — it is the thing you declare into. Naming the alias Job claimed it was the work itself, and the name propagated into every parameter derived from it (job: super::Job in run_node read as if it carried the DAG). Prose uses meaning the job *queue* are left alone: main.rs's "Job-queue scheduler" comment and the docs/coordinator.md reference. 315 tests pass unchanged.
This commit is contained in:
parent
8ce265fdf0
commit
379c9bb570
6 changed files with 42 additions and 42 deletions
|
|
@ -36,7 +36,7 @@ pub const GRACEFUL_STOP_TIMEOUT: std::time::Duration = std::time::Duration::from
|
|||
///
|
||||
/// ⚠️ Taken **by value and handed back**, not by reference. A `JobBuilder` is
|
||||
/// `RefCell`-backed: owned it is `Send`, but `&JobBuilder` is not (a shared ref
|
||||
/// is `Send` only if the referent is `Sync`, and `RefCell` never is). A `&Job`
|
||||
/// is `Send` only if the referent is `Sync`, and `RefCell` never is). A `&JobBuilder`
|
||||
/// parameter would be live across every `.await` in this fn and make the whole
|
||||
/// future non-`Send`, which the scheduler's `tokio::spawn` rejects. So the
|
||||
/// growth executors below return *what to grow* and the declaration happens
|
||||
|
|
@ -48,10 +48,10 @@ pub const GRACEFUL_STOP_TIMEOUT: std::time::Duration = std::time::Duration::from
|
|||
/// themselves. Nothing here needs a claim to exist as a type.
|
||||
pub(super) async fn run_node(
|
||||
coord: &Arc<Coordinator>,
|
||||
job: super::Job,
|
||||
job: super::JobBuilder,
|
||||
id: NodeId,
|
||||
kind: &NodeKind,
|
||||
) -> (super::Job, Result<()>) {
|
||||
) -> (super::JobBuilder, Result<()>) {
|
||||
// The agent this node targets rides the payload — empty for the agentless
|
||||
// container kinds (`MetaLock`, `Dag`), which never read it.
|
||||
let agent = kind.agent();
|
||||
|
|
|
|||
Loading…
Reference in a new issue