This commit is contained in:
Kyle Lahnakoski 2019-04-13 10:36:34 -04:00
Родитель 3b3beb2c95
Коммит df0272f4cb
1 изменённых файлов: 6 добавлений и 3 удалений

Просмотреть файл

@ -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)