Files
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

49 lines
1.1 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isFinished = void 0;
const content = `--[[
Checks if a job is finished (.i.e. is in the completed or failed set)
Input:
KEYS[1] completed key
KEYS[2] failed key
KEYS[3] job key
ARGV[1] job id
ARGV[2] return value?
Output:
0 - Not finished.
1 - Completed.
2 - Failed.
-1 - Missing job.
]]
local rcall = redis.call
if rcall("EXISTS", KEYS[3]) ~= 1 then
if ARGV[2] == "1" then
return {-1,"Missing key for job " .. KEYS[3] .. ". isFinished"}
end
return -1
end
if rcall("ZSCORE", KEYS[1], ARGV[1]) ~= false then
if ARGV[2] == "1" then
local returnValue = rcall("HGET", KEYS[3], "returnvalue")
return {1,returnValue}
end
return 1
end
if rcall("ZSCORE", KEYS[2], ARGV[1]) ~= false then
if ARGV[2] == "1" then
local failedReason = rcall("HGET", KEYS[3], "failedReason")
return {2,failedReason}
end
return 2
end
if ARGV[2] == "1" then
return {0}
end
return 0
`;
exports.isFinished = {
name: 'isFinished',
content,
keys: 3,
};
//# sourceMappingURL=isFinished-3.js.map