Que v0.2.0 Que.Queue

Summary

Functions

Finds the Job in Queue by the specified key name and value

Returns a new processable Queue with defaults

Pops the next Job in queue and returns a queue and Job tuple

Pushes one or more Jobs to the queued list

Removes the specified Job from running

Finds a Job in the Queue by the given Job’s id, replaces it and returns an updated Queue

Functions

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

Finds the Job in Queue by the specified key name and value.

If no key is specified, it’s assumed to be an :id. If the specified key is a :ref, it only searches in the :running list.

new(worker, jobs \\ [])

Returns a new processable Queue with defaults

pop(q)

Pops the next Job in queue and returns a queue and Job tuple

process(q)
push(q, jobs)

Pushes one or more Jobs to the queued list

remove(q, job)

Removes the specified Job from running

update(q, job)

Finds a Job in the Queue by the given Job’s id, replaces it and returns an updated Queue