From d9154366571e4ded2f562c7315d91f970b2002cf Mon Sep 17 00:00:00 2001 From: kshitijk4poor <82637225+kshitijk4poor@users.noreply.github.com> Date: Sun, 27 Sep 2026 00:36:01 +0530 Subject: [PATCH] refactor(gateway): type the housekeeping pool as an Executor --- gateway/run.py | 2 +- tests/gateway/test_executor_pool_isolation.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/gateway/run.py b/gateway/run.py index 6b473917e6..6c9556d10f 100644 --- a/gateway/run.py +++ b/gateway/run.py @@ -4339,7 +4339,7 @@ class GatewayRunner( return GatewayRunner._get_or_create_pool( self, "_executor", lambda: _UnboundedThreadExecutor(thread_name_prefix="hermes-gateway")) - def _get_housekeeping_executor(self) -> concurrent.futures.ThreadPoolExecutor: + def _get_housekeeping_executor(self) -> concurrent.futures.Executor: """Return the gateway-owned executor for best-effort session housekeeping.""" return GatewayRunner._get_or_create_pool( self, "_housekeeping_executor", diff --git a/tests/gateway/test_executor_pool_isolation.py b/tests/gateway/test_executor_pool_isolation.py index 8c3f2b49bb..ef27c72b27 100644 --- a/tests/gateway/test_executor_pool_isolation.py +++ b/tests/gateway/test_executor_pool_isolation.py @@ -25,6 +25,7 @@ import pytest from gateway.run import GatewayRunner + def _runner(cleanup=None, *, cleanup_timeout=0.5): runner = GatewayRunner.__new__(GatewayRunner) runner._executor_lock = threading.Lock()