File tree Expand file tree Collapse file tree 2 files changed +14
-7
lines changed
images/utils/launcher/node Expand file tree Collapse file tree 2 files changed +14
-7
lines changed Original file line number Diff line number Diff line change 17
17
from docker import DockerClient
18
18
from docker .errors import ImageNotFound
19
19
20
- from launcher .errors import FatalError
20
+ from launcher .errors import FatalError , NoWaiting
21
+ from launcher .utils import yes_or_no
21
22
22
23
if TYPE_CHECKING :
23
24
from .base import Node
@@ -352,11 +353,17 @@ def check_for_updates(self) -> Dict[Image, str]:
352
353
executor = self .config .executor
353
354
354
355
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
360
367
361
368
result = {}
362
369
for f in done :
Original file line number Diff line number Diff line change @@ -202,7 +202,7 @@ def _ensure_dependencies_ready(self, stop: threading.Event):
202
202
names_str = ", " .join (names )
203
203
reply = yes_or_no ("Keep waiting for {} to be ready?" .format (names_str ))
204
204
if reply == "no" :
205
- raise Exception ( "Give up waiting for {}" . format ( names_str ))
205
+ raise NoWaiting
206
206
207
207
def _save_seed (self , output ):
208
208
s = output
You can’t perform that action at this time.
0 commit comments