debian-mirror-gitlab/spec/support/helpers/redis_without_keys.rb
2021-06-08 01:23:25 +05:30

10 lines
276 B
Ruby

# frozen_string_literal: true
class Redis
ForbiddenCommand = Class.new(StandardError)
def keys(*args)
raise ForbiddenCommand, "Don't use `Redis#keys` as it iterates over all "\
"keys in redis. Use `Redis#scan_each` instead."
end
end