mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
FIX: Should flush rate limit keys before testing it
This commit is contained in:
@ -63,9 +63,9 @@ class DiscourseRedis
|
||||
@redis.del k
|
||||
end
|
||||
|
||||
def keys
|
||||
def keys(pattern=nil)
|
||||
len = DiscourseRedis.namespace.length + 1
|
||||
@redis.keys("#{DiscourseRedis.namespace}:*").map{
|
||||
@redis.keys("#{DiscourseRedis.namespace}:#{pattern || '*'}").map{
|
||||
|k| k[len..-1]
|
||||
}
|
||||
end
|
||||
|
Reference in New Issue
Block a user