fix: don't use retry in readiness predicate as this makes things too slow

This commit is contained in:
gmega 2025-01-12 20:35:26 -03:00
parent 54c224d760
commit 4cf3117390
No known key found for this signature in database
GPG Key ID: 6290D34EAD824B18

View File

@ -131,6 +131,9 @@ class DelugeNode(SharedFSNode[Torrent, DelugeMeta], ExperimentComponent):
@retry(wait=wait_exponential(multiplier=1, min=4, max=16))
def connect(self) -> Self:
return self._raw_connect()
def _raw_connect(self):
client = DelugeRPCClient(**self.daemon_args)
client.connect()
self._rpc = client
@ -138,7 +141,7 @@ class DelugeNode(SharedFSNode[Torrent, DelugeMeta], ExperimentComponent):
def is_ready(self) -> bool:
try:
self.connect()
self._raw_connect()
return True
except (ConnectionRefusedError, socket.gaierror):
return False