Verk.Queue
This module interacts with a queue
Summary
| clear!(queue) | Clears the |
| clear(queue) | Clears the |
| count!(queue) | Counts how many jobs are enqueued on a queue, raising if there’s an error |
| count(queue) | Counts how many jobs are enqueued on a queue |
| delete_job!(queue, original_json) | Delete job from the |
| delete_job(queue, original_json) | Deletes the job from the |
| range!(queue, start \\ 0, stop \\ -1) | Lists enqueued jobs from |
| range(queue, start \\ 0, stop \\ -1) | Lists enqueued jobs from |
Functions
Specs:
- clear(binary) :: {:ok, boolean} | {:error, Redix.Error.t}
Clears the queue
It will return {:ok, true} if the queue was cleared and {:ok, false} otherwise
An error tuple may be returned if Redis failed
Specs:
- clear!(binary) :: boolean
Clears the queue, raising if there’s an error
It will return true if the queue was cleared and false otherwise
Specs:
- count(binary) :: {:ok, integer} | {:error, atom | Redix.Error.t}
Counts how many jobs are enqueued on a queue
Specs:
- count!(binary) :: integer
Counts how many jobs are enqueued on a queue, raising if there’s an error
Specs:
- delete_job(binary, %Verk.Job{args: term, class: term, enqueued_at: term, error_backtrace: term, error_message: term, failed_at: term, finished_at: term, jid: term, original_json: term, queue: term, retried_at: term, retry_count: term} | binary) :: {:ok, boolean} | {:error, Redix.Error.t}
Deletes the job from the queue
It returns {:ok, true} if the job was found and deleted
Otherwise it returns `{:ok, false}``
An error tuple may be returned if Redis failed
Specs:
- delete_job!(binary, %Verk.Job{args: term, class: term, enqueued_at: term, error_backtrace: term, error_message: term, failed_at: term, finished_at: term, jid: term, original_json: term, queue: term, retried_at: term, retry_count: term} | binary) :: boolean
Delete job from the queue, raising if there’s an error
It returns true if the job was found and delete
Otherwise it returns false
An error will be raised if Redis failed
Specs:
- range(binary, integer, integer) :: {:ok, [Verk.Job.T]} | {:error, Redix.Error.t}
Lists enqueued jobs from start to stop
Specs:
- range!(binary, integer, integer) :: [Verk.Job.T]
Lists enqueued jobs from start to stop, raising if there’s an error