Skip to content

Commit

Permalink
Amend example for RedisScanner utility class
Browse files Browse the repository at this point in the history
The scanner requires an instance of the Redis gem's Redis client
rather than the Redis connection return by Sidekiq.redis.
  • Loading branch information
jsugarman committed Nov 2, 2023
1 parent 747193f commit df11113
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/utilities/redis_scanner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@
# scanner.results
#
# Example usage:
# redis = Sidekiq.redis { |r| r }
#
# require_relative 'lib/utilities/redis_scanner'
#
# redis = Redis.new(url: Rails.configuration.x.redis.base_url)
# scanner = Utilities::RedisScanner.new(redis)
# OR
# scanner = Utilities::RedisScanner.new(redis.redis) # if redis is instance of Redis::Namespace
#
# search for all keys that do not start with "stat"
# scanner.call(/^((?!stat:).)*$/)
Expand Down

0 comments on commit df11113

Please sign in to comment.