fix: 脚本问题导致限流脚本无效,不确定是否是版本升级带来的问题。
This commit is contained in:
parent
e34b4172b8
commit
16ae69ed06
@ -2,7 +2,7 @@ local c
|
|||||||
c = redis.call('get',KEYS[1])
|
c = redis.call('get',KEYS[1])
|
||||||
-- 调用不超过最大值,则直接返回
|
-- 调用不超过最大值,则直接返回
|
||||||
if c and tonumber(c) > tonumber(ARGV[1]) then
|
if c and tonumber(c) > tonumber(ARGV[1]) then
|
||||||
return c;
|
return tonumber(c);
|
||||||
end
|
end
|
||||||
-- 执行计算器自加
|
-- 执行计算器自加
|
||||||
c = redis.call('incr',KEYS[1])
|
c = redis.call('incr',KEYS[1])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user