loop through each instance, wait for a new one to come up, then deregister and terminate the old one
This commit is contained in:
@@ -42,6 +42,10 @@ module AWS
|
||||
self.instance_variable_set "@#{key}", value
|
||||
end
|
||||
end
|
||||
|
||||
def ec2_instances
|
||||
[]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -12,10 +12,20 @@ module AWS
|
||||
end
|
||||
end
|
||||
|
||||
class InstanceCollection
|
||||
class InstanceCollection < Array
|
||||
def initialize
|
||||
end
|
||||
|
||||
def register(*instances)
|
||||
self.concat instances
|
||||
end
|
||||
|
||||
def deregister(*instances)
|
||||
instances.each do |i|
|
||||
self.delete i
|
||||
end
|
||||
end
|
||||
|
||||
def health
|
||||
@health ||= [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user