Module: Sidekiq::RedisClientAdapter::CompatMethods
- Defined in:
- lib/sidekiq/redis_client_adapter.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args, &block) ⇒ Object
this allows us to use methods like ‘conn.hmset(…)` instead of having to use redis-client’s native ‘conn.call(“hmset”, …)`
28
29
30
31
|
# File 'lib/sidekiq/redis_client_adapter.rb', line 28
def method_missing(*args, &block)
warn("[sidekiq#5788] Redis has deprecated the `#{args.first}`command, called at #{caller(1..1)}") if DEPRECATED_COMMANDS.include?(args.first)
@client.call(*args, *block)
end
|
Instance Method Details
#evalsha(sha, keys, argv) ⇒ Object
20
21
22
|
# File 'lib/sidekiq/redis_client_adapter.rb', line 20
def evalsha(sha, keys, argv)
@client.call("EVALSHA", sha, keys.size, *keys, *argv)
end
|
#info ⇒ Object
16
17
18
|
# File 'lib/sidekiq/redis_client_adapter.rb', line 16
def info
@client.call("INFO") { |i| i.lines(chomp: true).map { |l| l.split(":", 2) }.select { |l| l.size == 2 }.to_h }
end
|