Workflow reference
JSON definitions, execution states, retries, and API cancellation. For post-processing stages and file routing, see Set up post-processing.
Steps
Each step selects one of these definition forms. Individual actions such as remux, thumbnail, and rclone are listed in the action reference.
| Step Type | Description |
|---|---|
preset | Run one step from an action preset with exactly this name. A name matching no preset is treated as a processor id instead, so {"type": "preset", "name": "thumbnail"} still runs the thumbnail processor with its defaults. |
workflow | Expand the workflow with exactly this name as a sub-DAG. A name matching no workflow fails the pipeline. |
inline | Run a processor with configuration embedded in the DAG |
DAG Definition
{
"name": "Post-Process",
"steps": [
{
"id": "remux",
"step": {"type": "preset", "name": "remux"},
"depends_on": []
},
{
"id": "thumbnail",
"step": {"type": "preset", "name": "thumbnail"},
"depends_on": ["remux"]
},
{
"id": "upload",
"step": {"type": "preset", "name": "upload"},
"depends_on": ["remux", "thumbnail"]
},
{
"id": "cleanup",
"step": {"type": "preset", "name": "delete_source"},
"depends_on": ["upload"]
}
]
}A step can also configure an action inline instead of naming an action preset:
{
"id": "thumbnail",
"step": {
"type": "inline",
"processor": "thumbnail",
"config": {
"timestamp_secs": 10,
"width": 640,
"quality": 2
}
},
"depends_on": ["remux"]
}Execution States
These are the states of a workflow execution (PENDING, PROCESSING, COMPLETED, FAILED, CANCELLED). Each step additionally starts as BLOCKED until every step it depends on has completed, then becomes PENDING until its job is created. A step whose dependency failed, or whose workflow failed or was cancelled, ends as CANCELLED.
On the workflow page, a step whose job is waiting for a free worker shows Queued, and a step whose job is running shows Running, with a progress bar when the job reports its progress.
Per-step retries and timeouts
A workflow step can carry its own retry budget and timeout in its definition:
{
"id": "upload",
"step": {"type": "preset", "name": "upload"},
"depends_on": ["remux"],
"retry": {"max_attempts": 3, "backoff_secs": 60},
"timeout_secs": 7200
}retry.max_attemptscounts the first run, so3allows two automatic retries;1, or noretry, means none.retry.backoff_secs(default 60) is the wait before the second attempt; it doubles for each further attempt and is capped at six hours.timeout_secslimits one attempt of that step's job and replaces the worker pool's default timeout for it, and for anexecutestep also the command timeout.
When an attempt fails or times out with attempts left, the job is stored as failed with the time of the next attempt in retry_after, its job page shows it as retrying with a countdown and the number of the next attempt, and the step on the workflow page shows Retrying with the same countdown; no failure notification is sent while automatic retries remain. The step keeps waiting and the workflow stays unfinished, reading Pending while its only active steps are queued or waiting to retry; nothing downstream is cancelled. The retry starts within about fifteen seconds of its time, also after a restart. For upload steps (rclone, rship, baidupcs, and aliyunpan), configuring retry.max_attempts above 1 lets the workflow step own retries and skips the processor's in-run retry loop, freeing the upload slot during backoff. Jobs that fail for non-retryable reasons — such as invalid inputs or configuration, missing remote paths, or rejected credentials — fail immediately without retrying. Once the budget is spent (or on a non-retryable failure), the failure notification is sent, the failure reaches the workflow as described above, and manual retry remains available. Cancelling the workflow drops a pending retry. The step dialog of the workflow editor exposes both settings under Retries and timeout.
Cancelling a Running Pipeline
DELETE /api/pipeline/{pipeline_id} cancels a pipeline. When the ID names a DAG execution, it cancels the running step jobs and marks the DAG as cancelled. The session stops waiting for that DAG, and the pipeline remains cancelled after a restart.
A cancelled DAG can be retried afterwards. Retry re-runs the steps that ended failed or cancelled; steps that had already completed are not repeated.
The request is idempotent: an id that matches no pipeline, and a DAG that is already in a terminal state, both answer with cancelled_count: 0 rather than an error.