Files
boc/vims-backend/node_modules/bull/lib/scripts/isFinished-2.js
T
Bernt 6de2455917 v1.2.0: Add Global Markets footer, translated to 9 languages
- Added GLOBAL_MARKETS_TITLE to all translation files
- Updated footer with 12 markets (4 active + 8 upcoming)
- Translated market section to: zh-cn, zh-tw, ja, ko, th, vi, id, ms, hi
- Built and deployed to production
- CloudFront invalidation: I3RTMXVFDJXWLG3SYX208OP1CC
2026-07-08 19:56:03 +00:00

26 lines
513 B
JavaScript

'use strict';
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
ARGV[1] job id
Output:
0 - not finished.
1 - completed.
2 - failed.
]]
if redis.call("ZSCORE", KEYS[1], ARGV[1]) ~= false then
return 1
end
if redis.call("ZSCORE", KEYS[2], ARGV[1]) ~= false then
return 2
end
return redis.call("ZSCORE", KEYS[2], ARGV[1])
`;
module.exports = {
name: 'isFinished',
content,
keys: 2,
};