Que v0.2.0 Que.QueueSet

Summary

Functions

Adds a Job to the appropriate Queue in a QueueSet

Groups a list of Jobs into a proper QueueSet. All Jobs are loaded only in the :queued list

Finds a Job in a QueueSet by the specified key-value pair

Finds the Queue for a specified worker. If the queue does not exist, returns a new Queue for that worker

Returns a new QueueSet with defaults

Calles :process on all Queues in QueueSet

Removes the specified job from the appropriate Queue’s running list

Finds a Job in the QueueSet by the given Job’s id and updates (replaces) it with the specified Job

Functions

add(qset, job)

Adds a Job to the appropriate Queue in a QueueSet

collect(jobs)

Groups a list of Jobs into a proper QueueSet. All Jobs are loaded only in the :queued list

find(queue_set, key \\ :id, value)

Finds a Job in a QueueSet by the specified key-value pair.

If no key is specified, it’s assumed to be :id.

get(qset, worker)

Finds the Queue for a specified worker. If the queue does not exist, returns a new Queue for that worker.

new()

Returns a new QueueSet with defaults

process(qset)

Calles :process on all Queues in QueueSet

remove(qset, job)

Removes the specified job from the appropriate Queue’s running list

update(qset, job)

Finds a Job in the QueueSet by the given Job’s id and updates (replaces) it with the specified Job