Module: Sidekiq::RedisScanner

Included in:
ProcessSet, Queue, Stats, Stats::Queues, Workers
Defined in:
lib/sidekiq/api.rb

Instance Method Summary collapse

Instance Method Details

#sscan(conn, key) ⇒ Object


7
8
9
10
11
12
13
14
15
16
# File 'lib/sidekiq/api.rb', line 7

def sscan(conn, key)
  cursor = '0'
  result = []
  loop do
    cursor, values = conn.sscan(key, cursor)
    result.push(*values)
    break if cursor == '0'
  end
  result
end