feat: extend enterprise gateway policies billing protocols and operations
This commit is contained in:
1 parent
1528b71882
commit
af43947b5d
67 files changed
+1822
-69
No files matched your search
@@ -5,5 +5,9 @@ if redis.call('ZCARD', KEYS[1]) >= tonumber(ARGV[1]) then
|
||||
return 0
|
||||
end
|
||||
redis.call('ZADD', KEYS[1], now + tonumber(ARGV[2]), ARGV[3])
|
||||
redis.call('PEXPIRE', KEYS[1], ARGV[2])
|
||||
-- Long async leases and short chat leases share the user bucket.
|
||||
-- A chat admission must never shorten a running async task's lease container.
|
||||
if redis.call('PTTL', KEYS[1]) < tonumber(ARGV[2]) then
|
||||
redis.call('PEXPIRE', KEYS[1], ARGV[2])
|
||||
end
|
||||
return 1
|
||||
Reference in new issue
Block a user