mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-19 04:57:54 +00:00
continue waiting for storage-servers under more error-conditions
This commit is contained in:
parent
4dc7f9637e
commit
7225cfb18f
@ -446,9 +446,12 @@ def await_client_ready(process, timeout=10, liveness=60*2):
|
|||||||
while (time.time() - start) < float(timeout):
|
while (time.time() - start) < float(timeout):
|
||||||
try:
|
try:
|
||||||
data = web_get(process.node_dir, u"", params={u"t": u"json"})
|
data = web_get(process.node_dir, u"", params={u"t": u"json"})
|
||||||
except ValueError as e:
|
js = json.loads(data)
|
||||||
|
except Exception as e:
|
||||||
print("waiting because '{}'".format(e))
|
print("waiting because '{}'".format(e))
|
||||||
js = json.loads(data)
|
time.sleep(1)
|
||||||
|
continue
|
||||||
|
|
||||||
if len(js['servers']) == 0:
|
if len(js['servers']) == 0:
|
||||||
print("waiting because no servers at all")
|
print("waiting because no servers at all")
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
@ -459,7 +462,7 @@ def await_client_ready(process, timeout=10, liveness=60*2):
|
|||||||
]
|
]
|
||||||
# if any times are null/None that server has never been
|
# if any times are null/None that server has never been
|
||||||
# contacted (so it's down still, probably)
|
# contacted (so it's down still, probably)
|
||||||
if any([t is None for t in server_times]):
|
if any(t is None for t in server_times):
|
||||||
print("waiting because at least one server not contacted")
|
print("waiting because at least one server not contacted")
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user