Перенес workflow
This commit is contained in:
16
src/app_runtime/workflow/contracts/context.py
Normal file
16
src/app_runtime/workflow/contracts/context.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass, field
|
||||
from typing import Any
|
||||
|
||||
|
||||
@dataclass(slots=True)
|
||||
class WorkflowContext:
|
||||
payload: dict[str, Any]
|
||||
state: dict[str, Any] = field(default_factory=dict)
|
||||
|
||||
def snapshot(self) -> dict[str, Any]:
|
||||
return {
|
||||
"payload": dict(self.payload),
|
||||
"state": dict(self.state),
|
||||
}
|
||||
Reference in New Issue
Block a user