feat: add redis gateway protection and task recovery
This commit is contained in:
1 parent
cbc7317aa8
commit
473479fc4c
17 files changed
+272
-10
No files matched your search
@@ -0,0 +1,8 @@
|
||||
local count = redis.call('INCR', KEYS[1])
|
||||
if count == 1 then
|
||||
redis.call('PEXPIRE', KEYS[1], ARGV[2])
|
||||
end
|
||||
if count > tonumber(ARGV[1]) then
|
||||
return math.max(1, redis.call('PTTL', KEYS[1]))
|
||||
end
|
||||
return 0
|
||||
Reference in new issue
Block a user