Files
codeql-action/node_modules/bottleneck/src/redis/check.lua
2020-09-21 19:15:19 +01:00

7 lines
254 B
Lua

local weight = tonumber(ARGV[num_static_argv + 1])
local capacity = process_tick(now, false)['capacity']
local nextRequest = tonumber(redis.call('hget', settings_key, 'nextRequest'))
return conditions_check(capacity, weight) and nextRequest - now <= 0