pub enum RunnerMessage {
Show 27 variants
Hello {
schedr_version: String,
mode: RunnerMode,
},
FileStarted {
path: String,
},
FileParsed {
path: String,
dags: Vec<Dag>,
connections: Vec<ConnectionDef>,
error: Option<ErrorSummary>,
warnings: Vec<String>,
},
ParseFinished,
TaskImported,
TaskSucceeded {
output: Value,
outcome: String,
},
SecretGet {
secret: SecretName,
},
ScriptDeclaration {
reference: String,
},
ConnectionGet {
name: String,
},
ApiCall {
method: String,
path: String,
body: Option<Value>,
idempotency_key: Option<String>,
},
HandleAdd {
handle: CleanupHandle,
},
TaskFailed {
error: ErrorSummary,
kind: Option<String>,
},
LoopBlocked {
watcher: Option<u64>,
stack: String,
},
TriggerEvent {
key: String,
data: Value,
at: Option<Timestamp>,
},
TriggerPoked {
error: Option<String>,
},
HostAlive {
threads: u32,
tied_threads: u32,
thread_stops: u64,
loop_lag_ms: u64,
},
WatcherStuck,
WatcherMessage {
watcher: u64,
message: Box<RunnerMessage>,
},
WatcherLog {
stream: OutputStream,
text: String,
},
WatcherCancelled,
WatcherMoved,
ForkServerReady,
ForkServerDisabled {
reason: String,
threads: Vec<String>,
},
Forked {
id: u64,
},
ForkFailed {
id: u64,
reason: String,
},
ProcessStarted {
pid: i32,
},
ProcessExited {
code: Option<i32>,
signal: Option<i32>,
core_dumped: bool,
usage: Option<ProcessUsage>,
},
}Expand description
A message from the runner to the agent.
Variants§
Hello
The first message: who is speaking and what for.
Fields
mode: RunnerModeThe mode the runner was started in.
FileStarted
The runner starts importing a file (the agent times each file).
FileParsed
A file was imported, or failed to import.
Fields
connections: Vec<ConnectionDef>The connections it defines itself (not those of modules it imports).
error: Option<ErrorSummary>Why importing it failed, if it did; then dags is empty.
ParseFinished
Every requested file was handled.
TaskImported
The task’s DAG file is imported and its arguments built; its function is called next (the agent times the start from it). Not sent when that fails.
TaskSucceeded
The task’s function returned; its output is encoded and within the size limit.
Fields
SecretGet
A running task reads a secret it didn’t get with the request: one under a declared
prefix (task_ctx.secret(...)); the agent answers AgentMessage::Secret or
AgentMessage::SecretFailed.
Fields
secret: SecretNameWhich secret.
ScriptDeclaration
A DAG file being parsed has a ScriptOperator (decision 293): the declaration it
refers to, <root>:<path>#<name> or /abs/path/schedr.toml#<name>; the agent answers
AgentMessage::ScriptDeclaration or AgentMessage::ScriptNotFound.
ConnectionGet
A running task opens a connection it didn’t get with the request
(with name():); the agent answers AgentMessage::Connection or
AgentMessage::ConnectionFailed.
ApiCall
A request to schedr’s REST API (schedr.api, M4.11h): the agent has the master run it as
the task; it answers AgentMessage::ApiAnswer.
Fields
HandleAdd
A running task registers a cleanup handle (cleanup_handle(x)); the agent answers
AgentMessage::HandleAdded or AgentMessage::HandleRefused.
Fields
handle: CleanupHandleThe handle.
TaskFailed
The task failed: an exception, or an output that can’t be stored.
Fields
error: ErrorSummaryWhat went wrong.
LoopBlocked
A watcher host’s event loop has been held past its limit: it can only be killed.
Fields
TriggerEvent
What a trigger found (inside a Self::WatcherMessage); it goes on when told
AgentMessage::EventStored.
Fields
TriggerPoked
A poke trigger’s call ended; error is why it failed. Nothing answers it.
HostAlive
A watcher host is there, its event loop held or not, and how it is doing.
Fields
WatcherStuck
A thread of this watcher didn’t stop in its grace time: its host ends after its result
(inside a Self::WatcherMessage).
WatcherMessage
Of one watcher, in a watcher host: what a task’s runner would send.
Fields
message: Box<RunnerMessage>The message: never a watcher_message.
WatcherLog
What a watcher printed: its attempt’s log (inside a Self::WatcherMessage).
WatcherCancelled
A watcher ended by its cancel (inside a Self::WatcherMessage).
WatcherMoved
A poke stopped between calls, as asked: its next one is on new code (decision 335).
ForkServerReady
The fork server preloaded its libraries and is single-threaded: it takes fork
requests.
ForkServerDisabled
The fork server can’t be used: tasks fall back (to the bare fork server, then to
spawn). It answers every later fork with fork_failed until the agent closes the
channel (exiting with a request unread would reset the connection and could lose this
message). Also the answer to a fork when a thread appeared since the check.
Fields
Forked
A fork request was carried out: the shim runs, and reports on the status socket.
ForkFailed
A fork request failed; the task falls back.
ProcessStarted
From the shim, on the status socket: the forked process runs in its own process group (its ID is the PID), so the agent may signal and watch the group.
ProcessExited
From the shim, on the status socket: the forked process ended. The shim reaps it when the agent closes its end, so the PID isn’t reused before.
Trait Implementations§
Source§impl Clone for RunnerMessage
impl Clone for RunnerMessage
Source§fn clone(&self) -> RunnerMessage
fn clone(&self) -> RunnerMessage
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RunnerMessage
impl Debug for RunnerMessage
Source§impl<'de> Deserialize<'de> for RunnerMessage
impl<'de> Deserialize<'de> for RunnerMessage
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 RunnerMessage
Source§impl JsonSchema for RunnerMessage
impl JsonSchema for RunnerMessage
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