Starting a running flow restarts its nodes, so interval and cron Injects keep firing; a params-dict node is told settings arrive by name

This commit is contained in:
2026-11-01 10:59:14 +01:00
parent e0f5ddc3a4
commit 48d4be6093
3 changed files with 30 additions and 4 deletions
+11 -1
View File
@@ -9,7 +9,7 @@ from pathlib import Path
import pytest
from fluksio.flow.controller import FlowController, follow_header
from fluksio.flow.controller import FlowController, _signature_gap, follow_header
from fluksio.flow.messages import DType, MessageSpec
from fluksio.flow.pipeline import Pipeline
from fluksio.flow.schemas import FlowDef, NodeDef
@@ -226,3 +226,13 @@ def test_a_header_it_cannot_read_for_certain_leaves_the_node():
"def run(value): pass\n",
):
assert follow_header(node, code) == node
def test_code_written_for_the_params_dict_is_told_settings_arrive_by_name():
gap = _signature_gap("def process(a, params): pass\n", "n", {"a"}, {"target"})
assert gap is not None
assert "process(..., target)" in gap
assert (
_signature_gap("def process(a, target): pass\n", "n", {"a"}, {"target"}) is None
)