mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-27 10:28:41 -05:00
RSpec is hard - continue cleanup of update_pool_size
This commit is contained in:
parent
ce4be86486
commit
57aae90b2a
2 changed files with 30 additions and 15 deletions
|
|
@ -682,14 +682,19 @@ module Vmpooler
|
|||
end
|
||||
|
||||
def update_pool_size(pool)
|
||||
puts "update_pool_size"
|
||||
mutex = pool_mutex(pool['name'])
|
||||
return if mutex.locked?
|
||||
puts "passed mutex.locked?"
|
||||
poolsize = $redis.hget('vmpooler__config__poolsize', pool['name'])
|
||||
return if poolsize.nil?
|
||||
puts "passed poolsize.nil?"
|
||||
poolsize = Integer(poolsize)
|
||||
return if poolsize == pool['size']
|
||||
puts "passed poolsize == pool['size']"
|
||||
mutex.synchronize do
|
||||
pool['size'] = poolsize
|
||||
puts "passed mutex.synchronize"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue