mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 01:58:41 -05:00
Move pool-checks into a function
This commit is contained in:
parent
29ad2b9e09
commit
8aab996666
1 changed files with 9 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue