Sha256: 340e361be9f1fffb1c3c975fa02f0916961a0e3139547966450be2f9def75a5f

Contents?: true

Size: 349 Bytes

Versions: 3

Compression:

Stored size: 349 Bytes

Contents

module QPush
  module Client
    class << self
      def redis
        redis_pool.with do |conn|
          yield conn
        end
      end

      def redis_pool
        @redis_pool ||= QPush::Base::RedisPool.create(Client.config.redis_pool,
                                                      Client.config.redis_url)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
qpush-0.1.8 lib/qpush/client/redis.rb
qpush-0.1.7 lib/qpush/client/redis.rb
qpush-0.1.6 lib/qpush/client/redis.rb