Files
simple-mail-cleaner/backend/node_modules/bullmq/dist/cjs/commands/releaseLock-1.lua
2026-01-22 15:49:12 +01:00

20 lines
306 B
Lua

--[[
Release lock
Input:
KEYS[1] 'lock',
ARGV[1] token
ARGV[2] lock duration in milliseconds
Output:
"OK" if lock extented succesfully.
]]
local rcall = redis.call
if rcall("GET", KEYS[1]) == ARGV[1] then
return rcall("DEL", KEYS[1])
else
return 0
end