JobProcessingQueue

JobProcessingQueue

new JobProcessingQueue(args)

Parameters:
Name Type Description
args Object

Job Options

Properties:
Name Type Description
agenda Object

The Agenda instance

attrs Object
Source:

Methods

insert(job) → {undefined}

Inserts job in queue where it will be order from left to right in decreasing order of nextRunAt and priority (in case of same nextRunAt), if all values are even the first jobs to be introduced will have priority

Parameters:
Name Type Description
job Job

job to add to queue

Source:

pop() → {Job}

Pops and returns last queue element (next job to be processed) without checking concurrency.

Source:

push(job) → {undefined}

Inserts job in first queue position

Parameters:
Name Type Description
job Job

job to add to queue

Source:

returnNextConcurrencyFreeJob(agendaDefinitions) → {Job}

Returns (does not pop, element remains in queue) first element (always from the right) that can be processed (not blocked by concurrency execution)

Parameters:
Name Type Description
agendaDefinitions Object

job to add to queue

Source: