mirror of
https://github.com/codex-storage/bittorrent-benchmarks.git
synced 2025-02-14 12:07:17 +00:00
fix: don't use retry in readiness predicate as this makes things too slow
This commit is contained in:
parent
54c224d760
commit
4cf3117390
@ -131,6 +131,9 @@ class DelugeNode(SharedFSNode[Torrent, DelugeMeta], ExperimentComponent):
|
|||||||
|
|
||||||
@retry(wait=wait_exponential(multiplier=1, min=4, max=16))
|
@retry(wait=wait_exponential(multiplier=1, min=4, max=16))
|
||||||
def connect(self) -> Self:
|
def connect(self) -> Self:
|
||||||
|
return self._raw_connect()
|
||||||
|
|
||||||
|
def _raw_connect(self):
|
||||||
client = DelugeRPCClient(**self.daemon_args)
|
client = DelugeRPCClient(**self.daemon_args)
|
||||||
client.connect()
|
client.connect()
|
||||||
self._rpc = client
|
self._rpc = client
|
||||||
@ -138,7 +141,7 @@ class DelugeNode(SharedFSNode[Torrent, DelugeMeta], ExperimentComponent):
|
|||||||
|
|
||||||
def is_ready(self) -> bool:
|
def is_ready(self) -> bool:
|
||||||
try:
|
try:
|
||||||
self.connect()
|
self._raw_connect()
|
||||||
return True
|
return True
|
||||||
except (ConnectionRefusedError, socket.gaierror):
|
except (ConnectionRefusedError, socket.gaierror):
|
||||||
return False
|
return False
|
||||||
|
Loading…
x
Reference in New Issue
Block a user