fix shutdown
This commit is contained in:
Родитель
3b3beb2c95
Коммит
df0272f4cb
|
@ -353,11 +353,14 @@ class SpotManager(object):
|
|||
# SEND SHUTDOWN TO EACH INSTANCE
|
||||
Log.warning("Shutdown {{instances}} to save money!", instances=remove_list.id)
|
||||
for g, removals in jx.groupby(remove_list, size=20):
|
||||
for t in [
|
||||
Thread.run("teardown " + i.id, self.instance_manager.teardown, i, please_stop=False)
|
||||
for i, t in [
|
||||
(i, Thread.run("teardown " + i.id, self.instance_manager.teardown, i, please_stop=False))
|
||||
for i in removals
|
||||
]:
|
||||
t.join()
|
||||
try:
|
||||
t.join()
|
||||
except Exception:
|
||||
Log.note("Problem with shutdown of {{id}}", id=i.id)
|
||||
|
||||
remove_spot_requests.extend(remove_list.spot_instance_request_id)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче