From 85882de2a6934d26859b1c136e09308f6ab79150 Mon Sep 17 00:00:00 2001 From: Timofey Koolin Date: Thu, 4 May 2023 15:23:14 +0300 Subject: [PATCH] fix check wait_executor --- ydb/_grpc/grpcwrapper/common_utils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ydb/_grpc/grpcwrapper/common_utils.py b/ydb/_grpc/grpcwrapper/common_utils.py index 1e9e83ca..a7058048 100644 --- a/ydb/_grpc/grpcwrapper/common_utils.py +++ b/ydb/_grpc/grpcwrapper/common_utils.py @@ -161,7 +161,7 @@ def __init__(self, convert_server_grpc_to_wrapper): self._wait_executor = None def __del__(self): - self._wait_executor.shutdown(wait=False) + self._clean_executor(wait=False) async def start(self, driver: SupportedDriverType, stub, method): if asyncio.iscoroutinefunction(driver.__call__): @@ -175,11 +175,11 @@ def close(self): if self._stream_call: self._stream_call.cancel() - self._clean_executor() + self._clean_executor(wait=True) - def _clean_executor(self): + def _clean_executor(self, wait: bool): if self._wait_executor: - self._wait_executor.shutdown() + self._wait_executor.shutdown(wait) async def _start_asyncio_driver(self, driver: ydb.aio.Driver, stub, method): requests_iterator = QueueToIteratorAsyncIO(self.from_client_grpc)