Skip to content

Commit

Permalink
remove inf loop
Browse files Browse the repository at this point in the history
  • Loading branch information
ericl committed Sep 11, 2019
1 parent 354e10b commit 512d70c
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions python/ray/autoscaler/autoscaler.py
Original file line number Diff line number Diff line change
Expand Up @@ -729,19 +729,11 @@ def request_resources(self, resources):

def kill_workers(self):
logger.error("StandardAutoscaler: kill_workers triggered")

while True:
try:
nodes = self.workers()
if nodes:
self.provider.terminate_nodes(nodes)
logger.error(
"StandardAutoscaler: terminated {} node(s)".format(
len(nodes)))
except Exception:
traceback.print_exc()

time.sleep(10)
nodes = self.workers()
if nodes:
self.provider.terminate_nodes(nodes)
logger.error("StandardAutoscaler: terminated {} node(s)".format(
len(nodes)))


def typename(v):
Expand Down

0 comments on commit 512d70c

Please sign in to comment.