Projektstart

This commit is contained in:
2026-01-22 15:49:12 +01:00
parent 7212eb6f7a
commit 57e5f652f8
10637 changed files with 2598792 additions and 64 deletions

View File

@@ -0,0 +1,28 @@
--[[
Adds a repeatable job
Input:
KEYS[1] 'repeat' key
ARGV[1] next milliseconds
ARGV[2] custom key
ARGV[3] legacy custom key TODO: remove this logic in next breaking change
Output:
repeatableKey - OK
]]
local rcall = redis.call
local repeatKey = KEYS[1]
local nextMillis = ARGV[1]
local customKey = ARGV[2]
local legacyCustomKey = ARGV[3]
if rcall("ZSCORE", repeatKey, customKey) then
rcall("ZADD", repeatKey, nextMillis, customKey)
return customKey
elseif rcall("ZSCORE", repeatKey, legacyCustomKey) ~= false then
rcall("ZADD", repeatKey, nextMillis, legacyCustomKey)
return legacyCustomKey
end
return ''