da-daken commented on code in PR #926:
URL: https://github.com/apache/flink-agents/pull/926#discussion_r3676216535
##########
python/flink_agents/runtime/flink_runner_context.py:
##########
@@ -241,6 +253,58 @@ def __await__(self) -> Any:
return result
+class _DurableBatchAsyncExecutionResult(AsyncExecutionResult):
+ def __init__(self, ctx: "FlinkRunnerContext", calls: list[DurableCall]) ->
None:
+ self._ctx = ctx
+ self._calls = calls
+
+ def __await__(self) -> Any:
+ plan = self._ctx._prepare_batch_execution(self._calls)
+ futures = [
+ self._ctx.tool_call_executor.submit(supplier) for _, supplier in
plan.suppliers
+ ]
+ timeout_ms =
self._ctx.config.get(AgentExecutionOptions.TOOL_CALL_BATCH_TIMEOUT)
+ deadline = time.monotonic() + timeout_ms / 1000 if timeout_ms >= 0
else None
Review Comment:
Thank you for the careful review~ I'll fix it in the next commit, changing
it to `> 0`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]