scope / lineage in frame
more structs to prepare for subgraph
This commit is contained in:
@@ -4,7 +4,14 @@ from copy import deepcopy
|
||||
|
||||
from wf_core.models.workflow import Workflow
|
||||
from wf_core.paths import set_nested_value
|
||||
from wf_core.run_state import ExecutionFrame, FrameStatus, RunState, RunStatus
|
||||
from wf_core.run_state import (
|
||||
ExecutionFrame,
|
||||
FrameStatus,
|
||||
LineageState,
|
||||
RunState,
|
||||
RunStatus,
|
||||
RuntimeScope,
|
||||
)
|
||||
from wf_core.runtime.scheduler import add_frame
|
||||
|
||||
|
||||
@@ -19,6 +26,14 @@ def create_run_state(workflow: Workflow, workflow_input: dict[str, object]) -> R
|
||||
status=RunStatus.PENDING,
|
||||
workflow_input=dict(workflow_input),
|
||||
state=state,
|
||||
scopes={
|
||||
"root": RuntimeScope(
|
||||
id="root",
|
||||
workflow_name=workflow.name,
|
||||
committed_state=state,
|
||||
)
|
||||
},
|
||||
lineages={"root": LineageState(id="root", scope_id="root")},
|
||||
current_frame_id="root",
|
||||
current_node_id=workflow.start,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user