Expand description
The DAG author’s local commands: schedr dags check and schedr dags test
(see archive/PROJECT.md, Testing DAGs).
dags check <path>imports the DAG files with the real runner (parse mode, the per-file timeout) and applies the master’s checks, so whatever the master would refuse is reported here; exit 1 on any error.--against <url>then reads that server’s active workers and fails when this schedr is newer (by minor version) than any of them. A pass prints oneok:line. A version the master cannot parse does not fail the check.dags test <dag> [--for]runs one real run in an in-process standalone with a temporary SQLite database: every task its own process, exactly as in production. It prints each task’s state as it changes, then the logs (prefixed with the task) and the outputs; exit 0 if the run succeeded, 1 otherwise.
Structs§
- Local
Root - The files of one root to check or test: a directory, or one file in its directory.
Constants§
- TEST_
RUN_ TIMEOUT - How long
dags testwaits for its run (a hanging task is stopped by its own timeout).
Functions§
- check_
root - Parses a root’s files with the real runner and applies the master’s checks.
- check_
scripts - A script root’s
schedr.tomlfiles read and checked, as a worker reads them (M4.9): for a path in a configured script root (its scripts never imported, as a DAG check would), or outside the configured roots aschedr.tomlor a directory holding one. The root is the configured script root, else the directory (the file’s own for a file).Nonefor a DAG check: a path in a configured DAG root, or anything else. - run_
local - Runs
schedr dags checkorschedr dags test.