This commit is contained in:
Nuno Campos
2023-09-13 23:03:06 +01:00
parent c74fd2b0ae
commit f12f501c79
+4 -2
View File
@@ -77,7 +77,7 @@ class PubSub(Runnable[Any, Any], ABC):
# Track exceptions
exceptions: List[Exception] = []
def on_idle():
def on_idle() -> None:
"""Called when all subscribed topics are empty.
It first runs any topic reducers. Then, if all subscribed topics
still empty, it closes the computation.
@@ -117,7 +117,9 @@ class PubSub(Runnable[Any, Any], ABC):
if not inflight or exc is not None:
on_idle()
def run_once(process: RunnableSubscriber[Any], value: Any) -> None:
def run_once(
process: RunnableSubscriber[Any] | RunnableReducer[Any], value: Any
) -> None:
"""Run a process once."""
def get(topic_name: str) -> Any: