feat: add graph workflow fallback and retry metadata
This commit is contained in:
@@ -17,6 +17,8 @@ _PRESET_TYPES = {
|
||||
"custom",
|
||||
}
|
||||
|
||||
_EXECUTION_MODES = {"legacy", "graph", "shadow"}
|
||||
|
||||
_NODE_TYPE_TO_STEP: dict[str, str] = {
|
||||
"inputNode": StepName.RESOLVE_STEP_PATH.value,
|
||||
"convertNode": StepName.STL_CACHE_GENERATE.value,
|
||||
@@ -243,6 +245,15 @@ def get_workflow_preset_type(config: dict[str, Any]) -> str | None:
|
||||
return None
|
||||
|
||||
|
||||
def get_workflow_execution_mode(config: dict[str, Any], *, default: str = "legacy") -> str:
|
||||
canonical = canonicalize_workflow_config(config)
|
||||
ui = canonical.get("ui") or {}
|
||||
mode = ui.get("execution_mode")
|
||||
if mode in _EXECUTION_MODES:
|
||||
return mode
|
||||
return default
|
||||
|
||||
|
||||
def extract_runtime_workflow(config: dict[str, Any]) -> tuple[str | None, dict[str, Any]]:
|
||||
canonical = canonicalize_workflow_config(config)
|
||||
preset = get_workflow_preset_type(canonical)
|
||||
|
||||
Reference in New Issue
Block a user