Skip to content

Commit 76ab108

Browse files
committed
update
1 parent d719bd5 commit 76ab108

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

images/utils/launcher/node/image.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
from docker import DockerClient
1818
from docker.errors import ImageNotFound
1919

20-
from launcher.errors import FatalError
20+
from launcher.errors import FatalError, NoWaiting
21+
from launcher.utils import yes_or_no
2122

2223
if TYPE_CHECKING:
2324
from .base import Node
@@ -352,11 +353,17 @@ def check_for_updates(self) -> Dict[Image, str]:
352353
executor = self.config.executor
353354

354355
futs = {executor.submit(img.get_update_action): img for img in images}
355-
done, not_done = wait(futs, 30)
356-
for f in not_done:
357-
logger.debug("Failed future %s", f)
358-
if len(not_done) > 0:
359-
raise RuntimeError("Failed to check for image updates")
356+
357+
while True:
358+
done, not_done = wait(futs, 30)
359+
if len(not_done) > 0:
360+
names = ", ".join([futs[f].name for f in not_done])
361+
print("Still waiting for update checking results of image(s): %s" % names)
362+
reply = yes_or_no("Would you like to keep waiting?")
363+
if reply == "no":
364+
raise NoWaiting
365+
else:
366+
break
360367

361368
result = {}
362369
for f in done:

images/utils/launcher/node/xud.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def _ensure_dependencies_ready(self, stop: threading.Event):
202202
names_str = ", ".join(names)
203203
reply = yes_or_no("Keep waiting for {} to be ready?".format(names_str))
204204
if reply == "no":
205-
raise Exception("Give up waiting for {}".format(names_str))
205+
raise NoWaiting
206206

207207
def _save_seed(self, output):
208208
s = output

0 commit comments

Comments
 (0)