Review funkt
This commit is contained in:
19
node_modules/bullmq/dist/cjs/commands/releaseLock-1.lua
generated
vendored
Normal file
19
node_modules/bullmq/dist/cjs/commands/releaseLock-1.lua
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
--[[
|
||||
Release lock
|
||||
|
||||
Input:
|
||||
KEYS[1] 'lock',
|
||||
|
||||
ARGV[1] token
|
||||
ARGV[2] lock duration in milliseconds
|
||||
|
||||
Output:
|
||||
"OK" if lock extended successfully.
|
||||
]]
|
||||
local rcall = redis.call
|
||||
|
||||
if rcall("GET", KEYS[1]) == ARGV[1] then
|
||||
return rcall("DEL", KEYS[1])
|
||||
else
|
||||
return 0
|
||||
end
|
||||
Reference in New Issue
Block a user