DagNode Minimum shape for a DAG node.
inheritance
id
stringdepends_on
Array<string>Generic concurrent DAG executor.
Executes nodes in a dependency graph with configurable concurrency, failure handling, and skip semantics. Nodes without dependency edges run in parallel (up to max_concurrency). Dependencies are respected via per-node deferreds.
5 declarations
DagNode Minimum shape for a DAG node.
idstringdepends_onArray<string>DagNodeResult Result for a single node.
idstringstatus'completed' | 'failed' | 'skipped'errorstringduration_msnumberDagOptions<T> Options for running a DAG.
TnodesNodes to execute.
Array<T>executeExecute a node. Throw on failure.
(node: T) => Promise<void>on_errorCalled after a node fails. For observability — the error is already recorded.
(node: T, error: Error) => Promise<void>on_skipCalled when a node is skipped (pre-skip or dependency failure).
(node: T, reason: string) => Promise<void>should_skipReturn true to skip a node without executing. Dependents still proceed.
(node: T) => booleanmax_concurrencyMaximum concurrent executions. Default: Infinity.
numberstop_on_failureStop starting new nodes on first failure. Default: true.
booleanskip_validationSkip internal graph validation (caller already validated).
booleanDagResult Result of a DAG execution.
successWhether all executed nodes succeeded.
booleanresultsPer-node results.
Map<string, DagNodeResult>completedNumber of nodes that completed successfully.
numberfailedNumber of nodes that failed.
numberskippedNumber of nodes that were skipped.
numberduration_msTotal execution time in milliseconds.
numbererrorError message if any nodes failed.
string<T extends DagNode>(options: DagOptions<T>): Promise<DagResult> Execute nodes in a dependency graph concurrently.
Independent nodes (no unmet dependencies) run in parallel up to
max_concurrency. When a node completes, its dependents become
eligible to start. Failure cascading and stop-on-failure are handled
per the options.
optionsDAG execution options.
DagOptions<T>Promise<DagResult> Aggregated result with per-node details.