Expand description
Tasks in DAG JSON: their kind, what they run, and their resolved settings.
Settings are stored resolved (the Python API applies StepDefaults and group
defaults), so the master never needs to know where a value came from.
Structs§
- Event
Named - An event posted through the API (decision 354), by name and, for a step waiting in a run,
key:
EventNamed("payment-completed", key=dag_ctx.params.order_id). - Mapped
- One mapped argument of
.expand(...): its name and the list it maps over. - Outcome
Decl - One of a task’s outcomes: its name, and for a
commandtask the exit code meaning it. - RunOf
- Which run of another DAG a step waits for, and of it which task (decision 353).
- Sensor
Wait For - What an
@sensor(wait_for=...)/@trigger(wait_for=...)waits for, and the parameter its function is given it in (its first): a run of another DAG (RunOf, aRunResult) or an event posted (EventNamed, anEvent, decision 354); exactly one of the two. - Task
- A task of a DAG.
- Task
Cleanup - A task’s cleanup:
finallyfor each of its attempts (see archive/PROJECT.md, Per-task cleanup). - Task
Settings - A task’s settings, resolved from its own arguments and the defaults that apply to it.
Enums§
- Cleanup
Run - What a task’s cleanup runs: of the same kind as the task (see archive/PROJECT.md, Per-task cleanup).
- Command
Line - What a
commandtask runs. - Expand
- What a mapped task’s instances vary over (decision 69): one instance per element.
- Resource
Role - A command’s or a script’s part in a resource, for
schedr task-ctx resource set|get. - RunIf
- A task’s trigger rule: what its upstream edges must have done for it to run (see archive/PROJECT.md, Outcomes, failures and joins). An edge not taken counts as skipped.
- Sensor
Mode - How a wait step waits.
- Task
Kind - The kind of a task and what it runs.
- Wait
Source - What a
SensorWaitForwaits for.
Constants§
- DEFAULT_
CLEANUP_ RETRIES - How many times a failed cleanup is retried by default (decision 217).
- DEFAULT_
CLEANUP_ RETRY_ DELAY_ MS - The default delay between a cleanup’s tries in milliseconds (decision 217).
- DEFAULT_
MAX_ OUTPUT_ SIZE - The default output size limit in bytes (
[outputs] default_max_size, 1 MiB). - DEFAULT_
OUTCOME - The outcome of a task without outcomes of its own (
DefaultOutcome.SUCCESS). - DEFAULT_
QUEUE - The queue a task goes to when it names none.
- DEFAULT_
RETRY_ DELAY_ MS - The default delay between attempts in milliseconds (5 minutes).
- MAX_
LAG_ MS - The longest
lagof aRunOf, either way: 10 years (3650 days), so a planned moment plus or minus it stays a timestamp.
Functions§
- default_
outcomes - A task’s outcomes when it declares none:
SUCCESS, exit code 0 for a command.