bullrs 0.0.3

A BullMQ compatible Job Queue based on Redis
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--[[
  Function to add job considering priority.
]]

-- Includes
--- @include "addBaseMarkerIfNeeded"
--- @include "getPriorityScore"

local function addJobWithPriority(markerKey, prioritizedKey, priority, jobId, priorityCounterKey,
  isPausedOrMaxed)
  local score = getPriorityScore(priority, priorityCounterKey)
  rcall("ZADD", prioritizedKey, score, jobId)
  addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed)
end