Sha256: c80e9ed07d885480c159349a20028d339bcffde65cb44fb974b67428a566b672

Contents?: true

Size: 399 Bytes

Versions: 6

Compression:

Stored size: 399 Bytes

Contents

module ActiveHook
  module Server
    class << self
      attr_reader :connection_pool

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

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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
activehook-server-0.1.5 lib/activehook/server/redis.rb
activehook-server-0.1.4 lib/activehook/server/redis.rb
activehook-server-0.1.3 lib/activehook/server/redis.rb
activehook-server-0.1.2 lib/activehook/server/redis.rb
activehook-server-0.1.1 lib/activehook/server/redis.rb
activehook-server-0.1.0 lib/activehook/server/redis.rb