Expand description
Messages between the worker agent and the Python runner (python -m schedr.runner).
They travel over the runner’s inherited socket (SCHEDR_AGENT_FD), each one as a 4-byte
big-endian length followed by that many bytes of UTF-8 JSON (see archive/PROJECT.md, Rust/Python
integration: the agent <-> runner channel). Every message is an object tagged by type.
Structs§
- Cleanup
Handle - A handle registered by an attempt: what its cleanup needs that only existed in it.
- DagFile
- Where a DAG file is.
- Error
Summary - A structured error summary: why a DAG file couldn’t be imported, or why a task failed.
- Fork
Request - A request to the fork server: start a runner process.
- Fork
Server Request - What the fork server preloads.
- Parse
Request - A parse job: the files of one root to import.
- Parsed
File - One file of a parse job: the DAGs it defines, or why it couldn’t be imported. The agent
builds it from
file_parsed, uploads it to the master, which stores it as is. - Process
Usage - What a process used, with the children it reaped: its parent’s view at its exit (
rusage). - RunInfo
- The run information a task gets (
dag_ctxand theSCHEDR_*variables). - Script
Cleanup Declaration - A declaration’s
[cleanup]: what its script runs, and only the settings itsschedr.tomlgives. - Script
Declaration - A declared script, as the agent answers a
ScriptOperator(decision 293): what its task runs, and only the settings itsschedr.tomlgives (the DAG’s defaults apply to the others). - Secret
Value - A secret’s value, fetched by the agent for an attempt.
- Task
Request - One task attempt for the runner to run.
- Trigger
Start - How a trigger starts.
- Watchers
Request - A watcher host’s request: what it holds for its whole life (decision 320).
Enums§
- Agent
Message - A message from the agent to the runner.
- Output
Stream - A process’s output stream.
- Runner
Message - A message from the runner to the agent.
- Runner
Mode - What the runner was started to do.
Constants§
- BLOCKED_
EVENT_ LOOP - The error kind of a wait step that held its host’s event loop past
[watchers] block_limit. - CONNECTION_
DENIED - The error kind of a connection a task opens without declaring it in
connections=(decision 179). - CONNECTION_
NOT_ FOUND - The error kind of a connection a task opens that its root’s registry doesn’t have (decision 174): not defined in the DAG folder, defined twice, or invalid.
- DAG_
FILE_ MISSING - The error kind of an attempt whose DAG file is missing although the worker has the root at the hash the master expects (the newest code): the file is gone, not on its way.
- INVALID_
DAG_ EXCEPTION - The exception name of the import error the master records for a file that imported but defines a DAG its checks refuse.
- INVALID_
PATH_ EXCEPTION - The exception name of the import error the master records for a file whose path isn’t inside its root.
- MAX_
MESSAGE_ SIZE - The largest message either side accepts, in bytes (the cap on inputs per task, 64 MiB).
- PARSE_
RESULT_ TOO_ LARGE_ EXCEPTION - The exception name of the import error the agent records for a file whose parse result (all its DAGs’ JSON together) is larger than the master accepts (B35).
- PARSE_
TIMEOUT_ EXCEPTION - The exception name of the import error the agent records for a file that took longer than the parse timeout.
- RUNNER_
DIED_ EXCEPTION - The exception name of the import error the agent records for a file whose runner died.
- SWITCHED_
OFF - The error kind of a wait step switched off for getting its host killed (decision 338).
- TASK_
NOT_ FOUND - The error kind of a task its DAG file no longer defines (the runner’s
task_not_found). - WATCHER_
HOST_ LOST - The error kind of a wait step whose host ended with no wait step to blame.
Functions§
- check_
runner_ version - Whether the agent accepts a runner: the versions must be equal (the binary and the
Python package are released together, see archive/PROJECT.md, Packaging and releases). The
agent’s Cargo version is compared as the Python package writes it: a release candidate
0.1.0-rc1is the package’s0.1.0rc1(decision 163). - python_
version - A Cargo version as the Python package’s metadata writes it (PEP 440, as maturin
normalizes it):
X.Y.Z-rcNisX.Y.ZrcN; a release is unchanged. The release workflow allows no other pre-release form (scripts/release.py).