6989a98d75
- Arkitektur: docs/auth/passwordless-architecture.md - Backend: iom/quixzoom-auth-service/ (FastAPI + Redis) - Webb: quixzoom-market-pages/se/login/ (QR-kod + polling) - App: iom/quixzoom-app/src/features/auth/ (push + deep links) Flöde: QR-kod → app-godkännande → webb-inloggad
20 lines
468 B
Lua
20 lines
468 B
Lua
local function removeLock(jobKey, stalledKey, token, jobId)
|
|
if token ~= "0" then
|
|
local lockKey = jobKey .. ':lock'
|
|
local lockToken = rcall("GET", lockKey)
|
|
if lockToken == token then
|
|
rcall("DEL", lockKey)
|
|
rcall("SREM", stalledKey, jobId)
|
|
else
|
|
if lockToken then
|
|
-- Lock exists but token does not match
|
|
return -6
|
|
else
|
|
-- Lock is missing completely
|
|
return -2
|
|
end
|
|
end
|
|
end
|
|
return 0
|
|
end
|