Skip to content

Commit 29d74b8

Browse files
committed
simplify lock classes
1 parent 134982a commit 29d74b8

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

ydb/coordination/lock_sync.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,14 @@ def __init__(
1414
):
1515
self._closed = False
1616
self._name = name
17-
self._loop = _get_shared_event_loop()
18-
self._caller = CallFromSyncToAsync(self._loop)
19-
self._client = client
20-
self._node_path = node_path
21-
self._timeout_sec = 30
17+
self._caller = CallFromSyncToAsync(_get_shared_event_loop())
18+
self._timeout_sec = 5
2219

2320
async def _make_lock():
2421
return CoordinationLock(
25-
client=self._client,
22+
client=client,
2623
name=self._name,
27-
node_path=self._node_path,
24+
node_path=node_path,
2825
)
2926

3027
self._async_lock: CoordinationLock = self._caller.safe_call_with_result(_make_lock(), self._timeout_sec)

0 commit comments

Comments
 (0)