class Upperkut::RedisPool
Constants
- DEFAULT_OPTIONS
Public Class Methods
new(options)
click to toggle source
# File lib/upperkut/redis_pool.rb, line 14 def initialize(options) @options = DEFAULT_OPTIONS.merge(url: ENV['REDIS_URL']) .merge(options) # Extract pool related options @size = @options.delete(:size) @pool_timeout = @options.delete(:pool_timeout) end
Public Instance Methods
create()
click to toggle source
# File lib/upperkut/redis_pool.rb, line 23 def create ConnectionPool.new(timeout: @pool_timeout, size: @size) do Redis.new(@options) end end