Skip to content

Commit

Permalink
fix: don't use retry in readiness predicate as this makes things too …
Browse files Browse the repository at this point in the history
…slow
  • Loading branch information
gmega committed Jan 12, 2025
1 parent 54c224d commit 4cf3117
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion benchmarks/deluge/deluge_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,17 @@ def rpc(self) -> DelugeRPCClient:

@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
return self

def is_ready(self) -> bool:
try:
self.connect()
self._raw_connect()
return True
except (ConnectionRefusedError, socket.gaierror):
return False
Expand Down

0 comments on commit 4cf3117

Please sign in to comment.