class Redis::Client
Constants
- ERROR_MAPPING
Public Class Methods
Source
# File lib/redis/client.rb, line 23 def config(**kwargs) super(protocol: 2, **kwargs) end
Calls superclass method
Source
# File lib/redis/client.rb, line 27 def sentinel(**kwargs) super(protocol: 2, **kwargs, client_implementation: ::RedisClient) end
Calls superclass method
Source
# File lib/redis/client.rb, line 31 def translate_error!(error, mapping: ERROR_MAPPING) redis_error = translate_error_class(error.class, mapping: mapping) raise redis_error, error.message, error.backtrace end
Public Instance Methods
Source
# File lib/redis/client.rb, line 102 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
Calls superclass method
Source
# File lib/redis/client.rb, line 96 def call_v(command, &block) super(command, &block) rescue ::RedisClient::Error => error Client.translate_error!(error) end
Calls superclass method
Source
# File lib/redis/client.rb, line 90 def ensure_connected(retryable: true, &block) super(retryable: retryable, &block) rescue ::RedisClient::Error => error Client.translate_error!(error) end
Calls superclass method
Source
# File lib/redis/client.rb, line 127 def inherit_socket! @inherit_socket = true end
Source
# File lib/redis/client.rb, line 121 def multi(watch: nil) super rescue ::RedisClient::Error => error Client.translate_error!(error) end
Calls superclass method
Source
# File lib/redis/client.rb, line 115 def pipelined(exception: true) super rescue ::RedisClient::Error => error Client.translate_error!(error) end
Calls superclass method