mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-27 02:18:41 -05:00
Replace connection_pool with vmpooler generic_connection_pool. Fix tests for changes.
This commit is contained in:
parent
b32b88b753
commit
90e09bfe1c
13 changed files with 808 additions and 509 deletions
|
|
@ -160,9 +160,16 @@ module Vmpooler
|
|||
pools
|
||||
end
|
||||
|
||||
def self.redis_connection_pool(host, port, password, size, timeout)
|
||||
ConnectionPool.new(size: size, timeout: timeout) {
|
||||
redis_connection(host, port, password)
|
||||
def self.redis_connection_pool(host, port, password, size, timeout, metrics)
|
||||
Vmpooler::PoolManager::GenericConnectionPool.new(
|
||||
metrics: metrics,
|
||||
metric_prefix: 'redis_connection_pool',
|
||||
size: size,
|
||||
timeout: timeout
|
||||
) {
|
||||
connection = Concurrent::Hash.new
|
||||
redis = redis_connection(host, port, password)
|
||||
connection['connection'] = redis
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue