Skip to content

Commit

Permalink
Remove the incorrect looping of terminate instances.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmarballi committed Mar 1, 2018
1 parent 35cb0ae commit 331c164
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions appscale/tools/remote_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -900,12 +900,11 @@ def terminate_spawned_instances(cls, spawned_instance_ids, agent, params):
"""
terminate_params = params.copy()
terminate_params[agent.PARAM_INSTANCE_IDS] = spawned_instance_ids
for _ in range(len(spawned_instance_ids)):
try:
agent.terminate_instances(params)
except (AgentRuntimeException, BotoServerError):
AppScaleLogger.warn("AppScale failed to terminate instance(s) with "
"id(s): {}".format(spawned_instance_ids))
try:
agent.terminate_instances(terminate_params)
except (AgentRuntimeException, BotoServerError):
AppScaleLogger.warn("AppScale failed to terminate instance(s) with "
"id(s): {}".format(spawned_instance_ids))


@classmethod
Expand Down

0 comments on commit 331c164

Please sign in to comment.