Sha256: 63b9b416c6cb8ec6604cf3b3af3aa4f5fe2686b78542bd1af82de05a52b26eea

Contents?: true

Size: 375 Bytes

Versions: 2

Compression:

Stored size: 375 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: Server.config.redis_pool) do
          Redis.new(url: Server.config.redis_url)
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
activehook-server-0.1.7 lib/activehook/server/redis.rb
activehook-server-0.1.6 lib/activehook/server/redis.rb