Class: Async::Redis::Context::Pipeline::Sync

Inherits:
Object
  • Object
show all
Includes:
Protocol::Redis::Methods
Defined in:
lib/async/redis/context/pipeline.rb

Overview

A synchronous wrapper for pipeline operations that executes one command at a time.

Instance Method Summary collapse

Constructor Details

#initialize(pipeline) ⇒ Sync

Initialize a new sync wrapper.



23
24
25
# File 'lib/async/redis/context/pipeline.rb', line 23

def initialize(pipeline)
	@pipeline = pipeline
end

Instance Method Details

#callObject

This method just accumulates the commands and their params.



28
29
30
31
32
33
34
# File 'lib/async/redis/context/pipeline.rb', line 28

def call(...)
	@pipeline.call(...)
	
	@pipeline.flush(1)
	
	return @pipeline.read_response
end