Flows and dashboards are created by POST under an issued or superuser-pinned id; PUT only updates; deleted flows leave a tombstone with their key; the controller stores by id and runs by key, hooks live under /hooks/<flow id>; a key with state or queued work behind it is refused until cleared

This commit is contained in:
2026-11-02 17:41:23 +01:00
parent fae85f5ecb
commit 08a6376836
63 changed files with 2832 additions and 936 deletions
+3 -2
View File
@@ -15,6 +15,7 @@ from fluksio.flow.pipeline import Pipeline
from fluksio.flow.schemas import FlowDef, NodeDef
from fluksio.flow.state import MemoryState
from fluksio.flow.store import FlowStore
from tests.utils.stores import created
SOURCE = "def process(reading, factor):\n return {'scaled': reading * factor}\n"
@@ -53,7 +54,7 @@ def test_a_setting_reaches_the_function_as_a_keyword_argument(store: FlowStore):
def test_a_setting_named_after_a_port_is_refused(store: FlowStore):
store.write_draft(a_flow(reading=3), 0)
created(store, a_flow(reading=3))
store.write_node_source("house", "scale", SOURCE, draft=True)
controller = FlowController(store)
@@ -81,7 +82,7 @@ READING = [MessageSpec(name="reading", dtype=DType.FLOAT)]
def _preview(store: FlowStore, flow: FlowDef, source: str | None):
store.write_draft(flow, 0)
created(store, flow)
if source is not None:
store.write_node_source("house", "scale", source, draft=True)
return FlowController(store).preview("house").nodes[0]