Files
url_tracker_tool/node_modules/bullmq/dist/cjs/commands/getStateV2-8.lua
Andrei 58f8093689 Rebrand from 'Redirect Intelligence v2' to 'URL Tracker Tool V2' throughout UI
- Updated all component headers and documentation
- Changed navbar and footer branding
- Updated homepage hero badge
- Modified page title in index.html
- Simplified footer text to 'Built with ❤️'
- Consistent V2 capitalization across all references
2025-08-19 19:12:23 +00:00

59 lines
1.0 KiB
Lua

--[[
Get a job state
Input:
KEYS[1] 'completed' key,
KEYS[2] 'failed' key
KEYS[3] 'delayed' key
KEYS[4] 'active' key
KEYS[5] 'wait' key
KEYS[6] 'paused' key
KEYS[7] 'waiting-children' key
KEYS[8] 'prioritized' key
ARGV[1] job id
Output:
'completed'
'failed'
'delayed'
'active'
'waiting'
'waiting-children'
'unknown'
]]
local rcall = redis.call
if rcall("ZSCORE", KEYS[1], ARGV[1]) ~= false then
return "completed"
end
if rcall("ZSCORE", KEYS[2], ARGV[1]) ~= false then
return "failed"
end
if rcall("ZSCORE", KEYS[3], ARGV[1]) ~= false then
return "delayed"
end
if rcall("ZSCORE", KEYS[8], ARGV[1]) ~= false then
return "prioritized"
end
if rcall("LPOS", KEYS[4] , ARGV[1]) ~= false then
return "active"
end
if rcall("LPOS", KEYS[5] , ARGV[1]) ~= false then
return "waiting"
end
if rcall("LPOS", KEYS[6] , ARGV[1]) ~= false then
return "waiting"
end
if rcall("ZSCORE", KEYS[7] , ARGV[1]) ~= false then
return "waiting-children"
end
return "unknown"