Class: Sidekiq::Status::RedisAdapter
- Inherits:
-
Object
- Object
- Sidekiq::Status::RedisAdapter
- Defined in:
- lib/sidekiq-status/redis_adapter.rb
Overview
adapter for redis-rb client
Instance Method Summary collapse
-
#initialize(client) ⇒ RedisAdapter
constructor
A new instance of RedisAdapter.
- #method_missing(method, *args) ⇒ Object
- #scan(**options, &block) ⇒ Object
- #schedule_batch(key, options) ⇒ Object
Constructor Details
#initialize(client) ⇒ RedisAdapter
Returns a new instance of RedisAdapter.
3 4 5 |
# File 'lib/sidekiq-status/redis_adapter.rb', line 3 def initialize(client) @client = client end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
15 16 17 |
# File 'lib/sidekiq-status/redis_adapter.rb', line 15 def method_missing(method, *args) @client.send(method, *args) end |
Instance Method Details
#scan(**options, &block) ⇒ Object
7 8 9 |
# File 'lib/sidekiq-status/redis_adapter.rb', line 7 def scan(**, &block) @client.scan_each(**, &block) end |
#schedule_batch(key, options) ⇒ Object
11 12 13 |
# File 'lib/sidekiq-status/redis_adapter.rb', line 11 def schedule_batch(key, ) @client.zrangebyscore key, [:start], [:end], limit: [[:offset], [:limit]] end |