Class: Sidekiq::RedisClientAdapter
- Inherits:
-
Object
- Object
- Sidekiq::RedisClientAdapter
- Defined in:
- lib/sidekiq/redis_client_adapter.rb
Defined Under Namespace
Modules: CompatMethods Classes: CompatClient
Constant Summary collapse
- BaseError =
RedisClient::Error
- CommandError =
RedisClient::CommandError
- DEPRECATED_COMMANDS =
You can add/remove items or clear the whole thing if you don’t want deprecation warnings.
%i[rpoplpush zrangebyscore zrevrange zrevrangebyscore getset hmset setex setnx].to_set
Instance Method Summary collapse
-
#initialize(options) ⇒ RedisClientAdapter
constructor
A new instance of RedisClientAdapter.
- #new_client ⇒ Object
Constructor Details
#initialize(options) ⇒ RedisClientAdapter
Returns a new instance of RedisClientAdapter.
63 64 65 66 67 68 69 70 |
# File 'lib/sidekiq/redis_client_adapter.rb', line 63 def initialize() opts = client_opts() @config = if opts.key?(:sentinels) RedisClient.sentinel(**opts) else RedisClient.config(**opts) end end |
Instance Method Details
#new_client ⇒ Object
72 73 74 |
# File 'lib/sidekiq/redis_client_adapter.rb', line 72 def new_client CompatClient.new(@config.new_client) end |