We want to terminate instances, not stop them.

This commit is contained in:
Jake Moshenko 2014-12-23 16:20:42 -05:00
parent 3ce64b4a7f
commit cece94e1da

View file

@ -147,9 +147,9 @@ class EC2Executor(BuilderExecutor):
@coroutine
def stop_builder(self, builder_id):
ec2_conn = self._get_conn()
stopped_instances = yield From(ec2_conn.stop_instances([builder_id], force=True))
if builder_id not in [si.id for si in stopped_instances]:
raise ExecutorException('Unable to stop instance: %s' % builder_id)
terminated_instances = yield From(ec2_conn.terminate_instances([builder_id], force=True))
if builder_id not in [si.id for si in terminated_instances]:
raise ExecutorException('Unable to terminate instance: %s' % builder_id)
class PopenExecutor(BuilderExecutor):