Sha256: cba39a509f702982ccb28792153d85c6bb43d997d9e0ee4e3cdaae01c222fc05

Contents?: true

Size: 335 Bytes

Versions: 7

Compression:

Stored size: 335 Bytes

Contents

module ActiveHook
  class << self
    attr_reader :connection_pool

    def redis
      @connection_pool ||= ConnectionPool.create
    end
  end

  class ConnectionPool
    def self.create
      ::ConnectionPool.new(size: ActiveHook.config.redis_pool) do
        Redis.new(url: ActiveHook.config.redis_url)
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
activehook-0.1.9 lib/activehook/redis.rb
activehook-0.1.8 lib/activehook/redis.rb
activehook-0.1.7 lib/activehook/redis.rb
activehook-0.1.6 lib/activehook/redis.rb
activehook-0.1.5 lib/activehook/redis.rb
activehook-0.1.4 lib/activehook/redis.rb
activehook-0.1.3 lib/activehook/redis.rb