pub struct Dag {Show 15 fields
pub produced_by: SchedrVersion,
pub id: DagId,
pub location: DagLocation,
pub description: Option<String>,
pub tags: Vec<String>,
pub trigger: Trigger,
pub initial_since: Option<Timestamp>,
pub max_active_runs: Option<u32>,
pub max_active_tasks: Option<u32>,
pub tasks: Vec<Task>,
pub edges: Vec<Edge>,
pub groups: Vec<Group>,
pub params: Option<Params>,
pub resources: Vec<Resource>,
pub notify: Vec<NotifyEntry>,
}Expand description
A DAG: its identity, trigger, tasks and dependencies.
Fields§
§produced_by: SchedrVersionThe schedr version whose runner produced this JSON.
id: DagIdThe DAG’s ID.
location: DagLocationWhere it is defined.
description: Option<String>A description shown in the UI.
Tags shown in the UI and used for filtering.
trigger: TriggerWhat starts its runs (besides people and other DAGs).
initial_since: Option<Timestamp>since of the run on the DAG’s first fire time (see archive/PROJECT.md, Runs).
max_active_runs: Option<u32>At most this many runs at a time; None for no limit.
max_active_tasks: Option<u32>At most this many of its tasks running at once, across all its runs (each instance of
a mapped task counts); None for no limit.
tasks: Vec<Task>The tasks, in declaration order.
edges: Vec<Edge>The dependencies between them.
groups: Vec<Group>The task groups (decision 64), for the UI and the API; the master schedules tasks only.
params: Option<Params>The run parameters it takes (Dag(params=...)); none: it takes none.
resources: Vec<Resource>Its resources.
notify: Vec<NotifyEntry>The channels it notifies, and of which events (Dag(notify=...), decision 409).
Implementations§
Source§impl Dag
impl Dag
Sourcepub fn resource_of_cleanup(&self, id: &TaskId) -> Option<&Resource>
pub fn resource_of_cleanup(&self, id: &TaskId) -> Option<&Resource>
The resource whose cleanup id is.
Sourcepub fn edges_into<'a>(
&'a self,
id: &'a TaskId,
) -> impl Iterator<Item = &'a Edge> + 'a
pub fn edges_into<'a>( &'a self, id: &'a TaskId, ) -> impl Iterator<Item = &'a Edge> + 'a
The edges into id, in order (one upstream task may have several, on different
outcomes).
Sourcepub fn upstream_of(&self, id: &TaskId) -> Vec<&TaskId>
pub fn upstream_of(&self, id: &TaskId) -> Vec<&TaskId>
The tasks id directly depends on, in edge order, without repeats.
Sourcepub fn downstream_of(&self, id: &TaskId) -> Vec<&TaskId>
pub fn downstream_of(&self, id: &TaskId) -> Vec<&TaskId>
The tasks that directly depend on id, in edge order, without repeats.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Dag
impl<'de> Deserialize<'de> for Dag
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Dag
Source§impl JsonSchema for Dag
impl JsonSchema for Dag
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more