Sha256: 87f55a3c4abb5c766b186aa0902050d5163e605bb5f844aca267a5f010c47ed3

Contents?: true

Size: 352 Bytes

Versions: 1

Compression:

Stored size: 352 Bytes

Contents

require 'redis'

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

1 entries across 1 versions & 1 rubygems

Version Path
activehook-0.1.0 lib/activehook/redis.rb