6de2455917
- 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
20 lines
588 B
Lua
20 lines
588 B
Lua
--[[
|
|
Function to debounce a job.
|
|
]]
|
|
|
|
local function debounceJob(prefixKey, debounceId, ttl, jobId, debounceKey, token)
|
|
if debounceId ~= "" then
|
|
local debounceKeyExists
|
|
if ttl ~= "" then
|
|
debounceKeyExists = not rcall('SET', debounceKey, jobId, 'PX', ttl, 'NX')
|
|
else
|
|
debounceKeyExists = not rcall('SET', debounceKey, jobId, 'NX')
|
|
end
|
|
if debounceKeyExists then
|
|
local currentDebounceJobId = rcall('GET', debounceKey)
|
|
rcall("PUBLISH", prefixKey .. "debounced@" .. token, currentDebounceJobId)
|
|
|
|
return currentDebounceJobId
|
|
end
|
|
end
|
|
end |