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
45
46
47
|
# File 'lib/sidekiq/redis_client_adapter.rb', line 45
def method_missing(*args, &block)
@client.call(*args, *block)
end
|
Instance Method Details
#brpop(*args) ⇒ Object
26
27
28
|
# File 'lib/sidekiq/redis_client_adapter.rb', line 26
def brpop(*args)
@client.blocking_call(false, "BRPOP", *args)
end
|
#brpoplpush(*args) ⇒ Object
22
23
24
|
# File 'lib/sidekiq/redis_client_adapter.rb', line 22
def brpoplpush(*args)
@client.blocking_call(false, "BRPOPLPUSH", *args)
end
|
#evalsha(sha, keys, argv) ⇒ Object
18
19
20
|
# File 'lib/sidekiq/redis_client_adapter.rb', line 18
def evalsha(sha, keys, argv)
@client.call("EVALSHA", sha, keys.size, *keys, *argv)
end
|
#exists?(key) ⇒ Boolean
39
40
41
|
# File 'lib/sidekiq/redis_client_adapter.rb', line 39
def exists?(key)
@client.call("EXISTS", key) { |c| c > 0 }
end
|
#info ⇒ Object
14
15
16
|
# File 'lib/sidekiq/redis_client_adapter.rb', line 14
def info
@client.call("INFO") { |i| i.lines(chomp: true).map { |l| l.split(":", 2) }.select { |l| l.size == 2 }.to_h }
end
|
#set(*args) ⇒ Object
30
31
32
|
# File 'lib/sidekiq/redis_client_adapter.rb', line 30
def set(*args)
@client.call("SET", *args) { |r| r == "OK" }
end
|
#sismember(*args) ⇒ Object
35
36
37
|
# File 'lib/sidekiq/redis_client_adapter.rb', line 35
def sismember(*args)
@client.call("SISMEMBER", *args) { |c| c > 0 }
end
|