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