Class: Sidekiq::RedisClientAdapter

Inherits:
Object
  • Object
show all
Defined in:
lib/sidekiq/redis_client_adapter.rb

Defined Under Namespace

Modules: CompatMethods Classes: CompatClient

Constant Summary collapse

BaseError =
RedisClient::Error
CommandError =
RedisClient::CommandError

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ RedisClientAdapter

Returns a new instance of RedisClientAdapter.



102
103
104
105
106
107
108
109
# File 'lib/sidekiq/redis_client_adapter.rb', line 102

def initialize(options)
  opts = client_opts(options)
  @config = if opts.key?(:sentinels)
    RedisClient.sentinel(**opts)
  else
    RedisClient.config(**opts)
  end
end

Instance Method Details

#new_clientObject



111
112
113
# File 'lib/sidekiq/redis_client_adapter.rb', line 111

def new_client
  CompatClient.new(@config.new_client)
end