Skip to main content

Command

Enum Command 

Source
pub enum Command {
Show 15 variants TriggerRun { dag_id: DagId, planned_for: Option<Timestamp>, params: Option<Map<String, Value>>, event: Option<AskedEvent>, }, Backfill(BackfillRequest), CancelBackfill { backfill_id: String, }, RestartTrigger { dag_id: DagId, }, SkipTriggerRun { dag_id: DagId, }, CancelRun { run_id: String, }, PauseDag { dag_id: DagId, cancel_runs: bool, }, UnpauseDag { dag_id: DagId, }, SwitchOnSensor { dag_id: DagId, sensor: TaskId, }, CancelTask { run_id: String, task_id: TaskId, map_index: Option<i32>, }, RetryTask { run_id: String, task_id: TaskId, map_index: Option<i32>, }, DrainWorker { worker_id: String, }, ResumeWorker { worker_id: String, }, CheckConnections { root: Option<String>, name: Option<String>, worker: Option<String>, }, TestConnection { name: String, root: Option<String>, worker: Option<String>, timeout_ms: u64, },
}
Expand description

An action asked for by a person.

Variants§

§

TriggerRun

Start a manual run, for planned_for (--for) or now.

Fields

§dag_id: DagId

The DAG.

§planned_for: Option<Timestamp>

The moment the run is for; now if not given.

§params: Option<Map<String, Value>>

Values for the run’s parameters, as JSON, over the DAG’s defaults (decision 138).

§event: Option<AskedEvent>

The event it brings, for a DAG a trigger starts.

§

Backfill(BackfillRequest)

Create a backfill (schedr runs backfill, decisions 363, 364, 400-404).

§

CancelBackfill

Cancel a backfill’s queued and running runs (schedr runs cancel --backfill, decision 402); its finished runs stay.

Fields

§backfill_id: String

The backfill.

§

RestartTrigger

Start a DAG’s trigger again from its bookmark, whatever stopped it (schedr triggers restart).

Fields

§dag_id: DagId

Its DAG.

§

SkipTriggerRun

Pass the run an @trigger(wait_for=...) keeps failing on, so it is called for the next (schedr triggers skip, decision 353); refused while a call of it runs.

Fields

§dag_id: DagId

Its DAG.

§

CancelRun

Cancel a run (queued or running).

Fields

§run_id: String

The run.

§

PauseDag

Stop the scheduler from creating runs of a DAG; optionally cancel its runs in progress.

Fields

§dag_id: DagId

The DAG.

§cancel_runs: bool

Also cancel its queued and running runs.

§

UnpauseDag

Let the scheduler create runs of a DAG again.

Fields

§dag_id: DagId

The DAG.

§

SwitchOnSensor

Switch a wait step back on (schedr sensors switch-on, decision 338).

Fields

§dag_id: DagId

Its DAG.

§sensor: TaskId

The wait step.

§

CancelTask

Cancel one task of a run (schedr tasks cancel): stopped if it runs, cancelled at once if it hasn’t started; the tasks downstream of it are cancelled.

Fields

§run_id: String

The run.

§task_id: TaskId

The task.

§map_index: Option<i32>

One instance of a mapped task; none: the whole task (decision 82).

§

RetryTask

Queue an unschedulable task of an unfinished run again (schedr tasks retry).

Fields

§run_id: String

The run.

§task_id: TaskId

The task.

§map_index: Option<i32>

The instance of a mapped task (decision 82).

§

DrainWorker

Drain a worker for maintenance (schedr workers drain): no new tasks, its running ones finish; kept across restarts until resumed.

Fields

§worker_id: String

The worker.

§

ResumeWorker

Let a drained worker take tasks again (schedr workers resume).

Fields

§worker_id: String

The worker.

§

CheckConnections

Render connections on a worker (schedr connections check, decisions 174, 193): every secret present or missing, never a value. Each root on a worker having its current code; the command’s result fills in as the workers answer.

Fields

§root: Option<String>

The root; none: every root with connections.

§name: Option<String>

One connection; none: all of the root’s.

§worker: Option<String>

The worker to run it on; none: one the master picks.

§

TestConnection

Open a connection on a worker and run its check (schedr connections test, decisions 193, 198-200): beside the tasks, no slot, one at a time per worker.

Fields

§name: String

The connection.

§root: Option<String>

Its root; none: the one root defining it.

§worker: Option<String>

The worker to run it on; none: one the master picks.

§timeout_ms: u64

How long it may take (decision 200: 60 s unless given), in milliseconds.

Implementations§

Source§

impl Command

Source

pub const fn kind(&self) -> &'static str

The command’s kind, as stored in its row (trigger_run, cancel_run, …).

Trait Implementations§

Source§

impl Clone for Command

Source§

fn clone(&self) -> Command

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Command

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Command

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for Command

Source§

impl PartialEq for Command

Source§

fn eq(&self, other: &Command) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Command

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Command

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.