Skip to content

Commit 82ea901

Browse files
committed
fixing format
1 parent 44a73fe commit 82ea901

File tree

2 files changed

+0
-9
lines changed

2 files changed

+0
-9
lines changed

ydb/aio/coordination/stream.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ async def start_session(self, path: str, timeout_millis: int):
3535
self._stream.write(start_msg)
3636

3737
try:
38-
# Wait for SessionStart response
3938
async for resp in self._stream.from_server_grpc:
4039
fs = FromServer.from_proto(resp)
4140
if fs.session_started:

ydb/coordination/lock_sync.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,26 +84,18 @@ def update(self, new_data: bytes, timeout: Optional[float] = None):
8484
return self._caller.safe_call_with_result(self._async_lock.update(new_data), t)
8585

8686
def close(self, timeout: Optional[float] = None):
87-
"""
88-
Закрытие синхронной обёртки: постараемся аккуратно освободить lock и остановить
89-
фоновые ресурсы асинхронной части (stream/reconnector) через async close().
90-
"""
9187
if self._closed:
9288
return
9389
t = timeout or self._timeout_sec
9490

95-
# best-effort release
9691
try:
9792
self._caller.safe_call_with_result(self._async_lock.release(), t)
9893
except Exception:
9994
pass
10095

101-
# если асинхнронный объект предоставляет close(flush) — вызвать его, иначе игнорировать
10296
try:
103-
# используем lambda, чтобы получить coroutine
10497
self._caller.safe_call_with_result(self._async_lock.close(True), t)
10598
except Exception:
106-
# некоторые версии могут не иметь close или оно может упасть — игнорируем
10799
pass
108100

109101
self._closed = True

0 commit comments

Comments
 (0)