Verk.SortedSet
This module interacts with the jobs on a sorted set
Summary
clear!(key, redis) | Clears the sorted set, raising if there’s an error |
clear(key, redis) | Clears the sorted set |
count!(key, redis) | Counts how many jobs are inside the sorted set, raising if there’s an error |
count(key, redis) | Counts how many jobs are inside the sorted set |
delete_job!(key, original_json, redis) | Deletes the job from the sorted set, raising if there’s an error |
delete_job(key, original_json, redis) | Deletes the job from the sorted set |
range!(key, start \\ 0, stop \\ -1, redis) | Lists jobs from |
range(key, start \\ 0, stop \\ -1, redis) | Lists jobs from |
Functions
Specs:
- clear(String.t, GenServer.server) :: {:ok, boolean} | {:error, Redix.Error.t}
Clears the sorted set
It will return {:ok, true}
if the sorted set was cleared and {:ok, false}
otherwise
An error tuple may be returned if Redis failed
Specs:
- clear!(String.t, GenServer.server) :: boolean
Clears the sorted set, raising if there’s an error
It will return true
if the sorted set was cleared and false
otherwise
Specs:
- count(String.t, GenServer.server) :: {:ok, integer} | {:error, Redix.Error.t}
Counts how many jobs are inside the sorted set
Specs:
- count!(String.t, GenServer.server) :: integer
Counts how many jobs are inside the sorted set, raising if there’s an error
Specs:
- delete_job(String.t, %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} | String.t, GenServer.server) :: {:ok, boolean} | {:error, Redix.Error.t}
Deletes the job from the sorted set
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!(String.t, %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} | String.t, GenServer.server) :: boolean
Deletes the job from the sorted set, raising if there’s an error
It returns true
if the job was found and delete
Otherwise it returns false
Specs:
- range(String.t, integer, integer, GenServer.server) :: {:ok, [Verk.Job.T]} | {:error, Redix.Error.t}
Lists jobs from start
to stop
Specs:
- range!(String.t, integer, integer, GenServer.server) :: nil
Lists jobs from start
to stop
, raising if there’s an error