Sha256: 0eb6188cbad8da029f4cf4712cae159845bf4e534edd6d167e9ced29f8957be2

Contents?: true

Size: 337 Bytes

Versions: 1

Compression:

Stored size: 337 Bytes

Contents

module RedisRb
  class Pipeline < Client
    BUFFER_SIZE = 50_000

    def initialize(redis)
      @redis = redis
      @commands = []
    end

    def call_command(command)
      @commands << command
    end

    def execute
      return if @commands.empty?
      @redis.call_command(@commands)
      @commands.clear
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
redis-0.2.0 lib/redis/pipeline.rb