DAGExecution
BaseDAGExecution
dataclass
¶
Bases: Generic[P, RVDAG]
A disposable callable instance of a DAG.
It holds information about the last execution and is not threadsafe.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dag |
DAG
|
The attached DAG. |
required |
target_nodes |
Optional[List[Alias]]
|
The leave ExecNodes to execute. If None will execute all ExecNodes. |
None
|
exclude_nodes |
Optional[List[Alias]]
|
The leave ExecNodes to exclude. If None will exclude no ExecNode. |
None
|
root_nodes |
Optional[List[Alias]]
|
The base ExecNodes that will server as ancestor for the graph. If None will run all ExecNodes. |
None
|
cache_deps_of |
Optional[List[Alias]]
|
cache all the dependencies of these nodes. This option can not be used together with target_nodes nor exclude_nodes. |
None
|
cache_in |
str
|
the path to the file where the execution should be cached.
The path should end in |
''
|
from_cache |
str
|
the path to the file where the execution should be loaded from.
The path should end in |
''
|
results: StrictDict[Identifier, Any]
property
writable
¶
Returns the results of the previous DAGExecution.
Before the DAG is executed, the results are the same as the underlying DAG. This also includes before/after setup. After Execution, the results have been enriched with all the ExecNodes' results.
DAGExecution
dataclass
¶
Bases: BaseDAGExecution[P, RVDAG]
Sync implementation of BaseDAGExecution.
__call__(*args, **kwargs)
¶
Call the DAG.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
*args |
args
|
positional arguments to pass in to the DAG |
()
|
**kwargs |
kwargs
|
keyword arguments to pass in to the DAG |
{}
|
Raises:
Type | Description |
---|---|
TawaziUsageError
|
if the DAGExecution has already been executed. |
Returns:
Name | Type | Description |
---|---|---|
RVDAG |
RVDAG
|
the return value of the DAG's Execution |
setup()
¶
Same thing as DAG.setup but target_nodes
and exclude_nodes
come from the DAGExecution's init.
AsyncDAGExecution
¶
Bases: BaseDAGExecution[P, RVDAG]
Async implementation of BaseDAGExecution.
__call__(*args, **kwargs)
async
¶
Call the DAG.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
*args |
args
|
positional arguments to pass in to the DAG |
()
|
**kwargs |
kwargs
|
keyword arguments to pass in to the DAG |
{}
|
Raises:
Type | Description |
---|---|
TawaziUsageError
|
if the DAGExecution has already been executed. |
Returns:
Name | Type | Description |
---|---|---|
RVDAG |
RVDAG
|
the return value of the DAG's Execution |
setup()
async
¶
Same thing as DAG.setup but target_nodes
and exclude_nodes
come from the DAGExecution's init.