Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(job): allow passing debounce as option #2666

Merged
merged 12 commits into from
Jul 29, 2024
Prev Previous commit
Next Next commit
chore: change debo to de
  • Loading branch information
roggervalf committed Jul 26, 2024

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
commit 0755ced6edc5d46d4117442d9b26e212c06c0805
4 changes: 1 addition & 3 deletions src/commands/addDelayedJob-6.lua
Original file line number Diff line number Diff line change
@@ -90,9 +90,7 @@ else
end
end

local debounceId = opts['debo'] and opts['debo']['id']

local debouncedJobId = debounceJob(args[1], opts['debo'],
local debouncedJobId = debounceJob(args[1], opts['de'],
jobId, debounceKey, eventsKey, maxEvents)
if debouncedJobId then
return debouncedJobId
4 changes: 1 addition & 3 deletions src/commands/addParentJob-4.lua
Original file line number Diff line number Diff line change
@@ -81,9 +81,7 @@ else
end
end

local debounceId = opts['debo'] and opts['debo']['id']

local debouncedJobId = debounceJob(args[1], opts['debo'],
local debouncedJobId = debounceJob(args[1], opts['de'],
jobId, debounceKey, eventsKey, maxEvents)
if debouncedJobId then
return debouncedJobId
2 changes: 1 addition & 1 deletion src/commands/addPrioritizedJob-8.lua
Original file line number Diff line number Diff line change
@@ -90,7 +90,7 @@ else
end
end

local debouncedJobId = debounceJob(args[1], opts['debo'],
local debouncedJobId = debounceJob(args[1], opts['de'],
jobId, debounceKey, eventsKey, maxEvents)
if debouncedJobId then
return debouncedJobId
2 changes: 1 addition & 1 deletion src/commands/addStandardJob-8.lua
Original file line number Diff line number Diff line change
@@ -94,7 +94,7 @@ else
end
end

local debouncedJobId = debounceJob(args[1], opts['debo'],
local debouncedJobId = debounceJob(args[1], opts['de'],
jobId, debounceKey, eventsKey, maxEvents)
if debouncedJobId then
return debouncedJobId
2 changes: 1 addition & 1 deletion src/commands/includes/storeJob.lua
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ local function storeJob(eventsKey, jobIdKey, jobId, name, data, opts, timestamp,
local jsonOpts = cjson.encode(opts)
local delay = opts['delay'] or 0
local priority = opts['priority'] or 0
local debounceId = opts['debo'] and opts['debo']['id']
local debounceId = opts['de'] and opts['de']['id']

local optionalValues = {}
if parentKey ~= nil then