Iterate node.run(), track events in context, and enqueue them.
(self, ctx: Context, node_input: Any)
| 261 | pass |
| 262 | |
| 263 | async def _run_node_loop(self, ctx: Context, node_input: Any) -> None: |
| 264 | """Iterate node.run(), track events in context, and enqueue them.""" |
| 265 | from ..utils.context_utils import Aclosing |
| 266 | |
| 267 | logger.debug("node %s execute loop start.", ctx.node_path) |
| 268 | async with Aclosing(self._node.run(ctx=ctx, node_input=node_input)) as agen: |
| 269 | async for event in agen: |
| 270 | self._track_event_in_context(event, ctx) |
| 271 | await self._enqueue_event(event, ctx) |
| 272 | |
| 273 | logger.debug("node %s execute loop end.", ctx.node_path) |
| 274 | |
| 275 | async def _run_node_loop_with_timeout( |
| 276 | self, ctx: Context, node_input: Any, timeout: float |
no test coverage detected