mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-24 04:55:53 +00:00
Get the liveness filter condition right
This commit is contained in:
parent
871df0b1b4
commit
9d670e54e2
@ -638,8 +638,12 @@ def await_client_ready(tahoe, timeout=10, liveness=60*2, minimum_number_of_serve
|
||||
|
||||
# check that all times are 'recent enough' (it's OK if _some_ servers
|
||||
# are down, we just want to make sure a sufficient number are up)
|
||||
if len([now - t <= liveness for t in server_times]) < minimum_number_of_servers:
|
||||
print("waiting because at least one server too old")
|
||||
alive = [t for t in server_times if now - t <= liveness]
|
||||
if len(alive) < minimum_number_of_servers:
|
||||
print(
|
||||
f"waiting because we found {len(alive)} servers "
|
||||
f"and want {minimum_number_of_servers}"
|
||||
)
|
||||
time.sleep(1)
|
||||
continue
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user