]> git.saurik.com Git - redis.git/blame - client-libraries/ruby/lib/pipeline.rb
update-scala-client script added
[redis.git] / client-libraries / ruby / lib / pipeline.rb
CommitLineData
57172ffb 1require "redis"
2
3class Redis
4 class Pipeline < Redis
5 BUFFER_SIZE = 50_000
6
7 def initialize(redis)
8 @redis = redis
9 @commands = []
10 end
0df1ead7 11
12 def call_command(command)
13 @commands << command
38210f7f 14 end
0df1ead7 15
16 def execute
17 @redis.call_command(@commands)
57172ffb 18 @commands.clear
19 end
20
21 end
d7fc9edb 22end