jobq: drop the Dag payload's created_at, read it off the node
The container node now carries its own `created_at` like every other node, so the payload copy recorded the same instant a second time — and only the payload one was reachable to a viewer that doesn't know what a Dag is. `dag_view` reads `node.created_at` off the container instead. `DagView` keeps the field on the wire: hivectl's dag_progress uses it as the elapsed fallback for a DAG that hasn't started yet. It just has one source now. Removing the field left chrono entirely unused in model.rs, which is the compiler confirming the payload had no other use for a timestamp.
This commit is contained in:
parent
24cd7f6d65
commit
55705fd617
2 changed files with 15 additions and 23 deletions
|
|
@ -12,7 +12,6 @@
|
|||
//! DAG can span agents). See `docs/coordinator.md::Job queue` for the
|
||||
//! full design.
|
||||
|
||||
use chrono::{DateTime, Utc};
|
||||
pub use hive_host_sock::jobs::{DagView, PermPayload, Source, State};
|
||||
use serde::Serialize;
|
||||
|
||||
|
|
@ -276,11 +275,12 @@ pub enum NodeKind {
|
|||
/// the DAG state. Pure grouping — lease- and
|
||||
/// build-slot-exempt; the executor instant-completes it (`Done`) so it
|
||||
/// reaches `Finishing` and its children start.
|
||||
Dag {
|
||||
source: Source,
|
||||
reason: String,
|
||||
created_at: DateTime<Utc>,
|
||||
},
|
||||
///
|
||||
/// No `created_at` here: the graph stamps [`hive_jobq::Node::created_at`] on
|
||||
/// every node at insert, so the container already has one. A second copy in
|
||||
/// the payload would be the same instant recorded twice, with only this
|
||||
/// variant's version reachable to a generic viewer.
|
||||
Dag { source: Source, reason: String },
|
||||
}
|
||||
|
||||
/// How a hive-c0re node describes itself to a generic graph viewer.
|
||||
|
|
|
|||
Loading…
Reference in a new issue