debian-mirror-gitlab/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

2019-10-12 21:52:04 +05:30
# frozen_string_literal: true
2018-03-17 18:26:18 +05:30
class Redis
ForbiddenCommand = Class.new(StandardError)
def keys(*args)
2021-06-08 01:23:25 +05:30
raise ForbiddenCommand, "Don't use `Redis#keys` as it iterates over all "\
"keys in redis. Use `Redis#scan_each` instead."
2018-03-17 18:26:18 +05:30
end
end