Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions base.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ QlessRecurringJob.__index = QlessRecurringJob
Qless.config = {}

-- Extend a table. This comes up quite frequently
function table.extend(self, other)
local function extend_table(target, other)
for i, v in ipairs(other) do
table.insert(self, v)
table.insert(target, v)
end
end

Expand Down
4 changes: 2 additions & 2 deletions queue.lua
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ function QlessQueue:peek(now, count)

-- With these in place, we can expand this list of jids based on the work
-- queue itself and the priorities therein
table.extend(jids, self.work.peek(count - #jids))
extend_table(jids, self.work.peek(count - #jids))

return jids
end
Expand Down Expand Up @@ -322,7 +322,7 @@ function QlessQueue:pop(now, worker, count)

-- With these in place, we can expand this list of jids based on the work
-- queue itself and the priorities therein
table.extend(jids, self.work.peek(count - #jids))
extend_table(jids, self.work.peek(count - #jids))

local state
for index, jid in ipairs(jids) do
Expand Down