Method: Redis::Client#blocking_call_v

Defined in:
lib/redis/client.rb

#blocking_call_v(timeout, command, &block) ⇒ Object



104
105
106
107
108
109
110
111
112
113
114
115
# File 'lib/redis/client.rb', line 104

def blocking_call_v(timeout, command, &block)
  if timeout && timeout > 0
    # Can't use the command timeout argument as the connection timeout
    # otherwise it would be very racy. So we add the regular read_timeout on top
    # to account for the network delay.
    timeout += config.read_timeout
  end

  super(timeout, command, &block)
rescue ::RedisClient::Error => error
  Client.translate_error!(error)
end