class SidekiqUniqueJobs::Digests
def entries(pattern: SCAN_PATTERN, count: DEFAULT_COUNT)
-
(Array
- an array of digests matching the given pattern)
Parameters:
-
count
(Integer
) -- DEFAULT_COUNT the number of entries to return -
pattern
(String
) -- SCAN_PATTERN the match pattern to search for
def entries(pattern: SCAN_PATTERN, count: DEFAULT_COUNT) options = {} options[:match] = pattern options[:count] = count if count result = redis { |conn| conn.zscan_each(key, **options).to_a } result.each_with_object({}) do |entry, hash| hash[entry[0]] = entry[1] end end