RunConcurrent
junjo.RunConcurrent
Kind: Class
SDK version: 0.64.0
Documentation channel: Next source preview
Signature
Section titled “Signature”RunConcurrent(name: str, items: Sequence[Node | Subflow])Execute a list of nodes or subflows concurrently.
An instance of RunConcurrent can be added to a workflow graph the same
way as any other node. Under the hood it starts one task per child item and
waits for them to settle.
If one child fails, Junjo cancels all still-pending siblings and re-raises the original failure. Cancelled siblings are marked as cancelled in telemetry rather than as errors so traces tell the full story of the failure boundary.
The child membership is immutable after construction. Junjo stores
items as a tuple so compiled graph snapshots, traversal, telemetry, and
visualization stay aligned with the same graph shape.
Constructor
Section titled “Constructor”Parameters
Section titled “Parameters”| Name | Type | Description | Default |
|---|---|---|---|
name |
str |
The name of this collection of concurrently executed nodes. |
|
items |
Sequence[Node | Subflow] |
A sequence of nodes or subflows to execute concurrently. Junjo copies this sequence into an immutable tuple during construction. |
Members
Section titled “Members”id: strReturns the unique identifier for the node or subflow.
name: strReturns the configured name of this concurrent execution group.
items: tuple[Node | Subflow, ...]Return the immutable child executables for this concurrent group.
service
Section titled “service”service(store: BaseStore) -> NoneExecute the provided nodes and subflows concurrently.
Child items receive the same run-local store. If one item fails, all still-pending siblings are cancelled and the original failure is re-raised once the cancellations have been drained.
execute
Section titled “execute”execute(store: BaseStore, parent_id: str) -> NoneExecute the RunConcurrent node with tracing and lifecycle dispatch.
This wraps service with a dedicated run-concurrent span and the
same started/completed/failed/cancelled lifecycle semantics used by
ordinary nodes.
Parameters
Section titled “Parameters”| Name | Type | Description | Default |
|---|---|---|---|
store |
BaseStore |
The run-local store for the current workflow execution. | |
parent_id |
str |
The parent workflow or subflow identifier. |