gitlab-org--gitlab-foss/spec/support/helpers/redis_without_keys.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
276 B
Ruby
Raw Normal View History

# 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