Files
action-gh-release/node_modules/bottleneck/src/redis/check.lua
2019-10-20 19:16:50 -04: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