Move pool-checks into a function

This commit is contained in:
Scott Schneider 2013-11-18 09:59:01 -08:00
parent 29ad2b9e09
commit 8aab996666

View file

@ -170,9 +170,7 @@ def destroy_vm vm, pool
}
end
pools.each do |pool|
def check_pool pool
puts "Starting new worker thread for pool '#{pool['name']}'"
Thread.new {
@ -251,6 +249,14 @@ pools.each do |pool|
}
end
pools.each do |pool|
check_pool(pool)
end
loop do
sleep(1)
end