fluksio.arrived(): a node can tell which inputs the wave behind it wrote, so a value written again unchanged is seen

This commit is contained in:
2026-11-05 21:24:21 +01:00
parent b7f1d21712
commit 7ddf8aa8f9
9 changed files with 127 additions and 7 deletions
+6
View File
@@ -10,6 +10,7 @@ import asyncio
import inspect
import logging
from collections.abc import Callable, Coroutine, Iterable, Iterator
from contextvars import ContextVar
from typing import TYPE_CHECKING, Any
from fluksio.flow import logs
@@ -37,6 +38,11 @@ class NodeOutputError(TypeError):
#: Settings the engine reads itself rather than handing to the node's function.
RESERVED_SETTINGS = frozenset({"synchronous"})
#: The input ports the wave running a node has written, for the length of that
#: run. None when the run cannot say, such as a flow starting or a replay. The
#: worker request carries it to ``fluksio.arrived()`` inside the node.
ARRIVED: ContextVar[list[str] | None] = ContextVar("arrived", default=None)
class Node:
"""