mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 18:08:42 -05:00
First attempt at adding connection pool to pool manager
This commit is contained in:
parent
70f0482d33
commit
52bf6c4c89
5 changed files with 498 additions and 413 deletions
|
|
@ -110,7 +110,7 @@ module Vmpooler
|
|||
# Create an index of pool aliases
|
||||
parsed_config[:pool_names] = Set.new
|
||||
unless parsed_config[:pools]
|
||||
redis = new_redis(parsed_config[:redis]['server'], parsed_config[:redis]['port'], parsed_config[:redis]['password'])
|
||||
redis = redis_connection(parsed_config[:redis]['server'], parsed_config[:redis]['port'], parsed_config[:redis]['password'])
|
||||
parsed_config[:pools] = load_pools_from_redis(redis)
|
||||
end
|
||||
|
||||
|
|
@ -156,7 +156,7 @@ module Vmpooler
|
|||
pools
|
||||
end
|
||||
|
||||
def self.new_redis(host = 'localhost', port = nil, password = nil)
|
||||
def self.redis_connection(host = 'localhost', port = nil, password = nil)
|
||||
Redis.new(host: host, port: port, password: password)
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue