Verk v1.6.1 Verk.DeadSet

This module interacts with jobs in the dead set.

Set config :verk, max_dead_jobs: value on your config file to set the max amount of dead jobs to be stored on your dead queue. Defaults at 100.

Link to this section Summary

Functions

Adds a job to the dead set ordering by timestamp

Adds a job to the dead set ordering by timestamp, raising if there’s an error

Clears the dead set

Clears the dead set, raising if there’s an error

Counts how many jobs are inside the dead set

Counts how many jobs are inside the dead set, raising if there’s an error

Delete the job from the dead set

Delete the job from the dead set, raising if there’s an exception

Redis dead set key

List jobs from start to stop, raising if there’s an error

Link to this section Functions

Link to this function add(job, timestamp, redis \\ Verk.Redis)
add(
  %Verk.Job{
    args: term(),
    class: term(),
    created_at: term(),
    enqueued_at: term(),
    error_backtrace: term(),
    error_message: term(),
    failed_at: term(),
    finished_at: term(),
    jid: term(),
    max_retry_count: term(),
    original_json: term(),
    queue: term(),
    retried_at: term(),
    retry_count: term()
  },
  integer(),
  GenServer.server()
) :: :ok | {:error, Redix.Error.t()}

Adds a job to the dead set ordering by timestamp

Optionally a redis connection can be specified

Link to this function add!(job, timestamp, redis \\ Verk.Redis)
add!(
  %Verk.Job{
    args: term(),
    class: term(),
    created_at: term(),
    enqueued_at: term(),
    error_backtrace: term(),
    error_message: term(),
    failed_at: term(),
    finished_at: term(),
    jid: term(),
    max_retry_count: term(),
    original_json: term(),
    queue: term(),
    retried_at: term(),
    retry_count: term()
  },
  integer(),
  GenServer.server()
) :: nil

Adds a job to the dead set ordering by timestamp, raising if there’s an error

Optionally a redis connection can be specified

Link to this function clear(redis \\ Verk.Redis)
clear(GenServer.server()) :: :ok | {:error, RuntimeError.t() | Redix.Error.t()}

Clears the dead set

Link to this function clear!(redis \\ Verk.Redis)
clear!(GenServer.server()) :: nil

Clears the dead set, raising if there’s an error

Link to this function count(redis \\ Verk.Redis)
count(GenServer.Server) :: {:ok, integer()} | {:error, Redix.Error.t()}

Counts how many jobs are inside the dead set

Link to this function count!(redis \\ Verk.Redis)
count!(GenServer.Server) :: integer()

Counts how many jobs are inside the dead set, raising if there’s an error

Link to this function delete_job(original_json, redis \\ Verk.Redis)
delete_job(
  %Verk.Job{
    args: term(),
    class: term(),
    created_at: term(),
    enqueued_at: term(),
    error_backtrace: term(),
    error_message: term(),
    failed_at: term(),
    finished_at: term(),
    jid: term(),
    max_retry_count: term(),
    original_json: term(),
    queue: term(),
    retried_at: term(),
    retry_count: term()
  }
  | String.t(),
  GenServer.server()
) :: :ok | {:error, RuntimeError.t() | Redix.Error.t()}

Delete the job from the dead set

Link to this function delete_job!(original_json, redis \\ Verk.Redis)
delete_job!(
  %Verk.Job{
    args: term(),
    class: term(),
    created_at: term(),
    enqueued_at: term(),
    error_backtrace: term(),
    error_message: term(),
    failed_at: term(),
    finished_at: term(),
    jid: term(),
    max_retry_count: term(),
    original_json: term(),
    queue: term(),
    retried_at: term(),
    retry_count: term()
  }
  | String.t(),
  GenServer.server()
) :: nil

Delete the job from the dead set, raising if there’s an exception

Redis dead set key

Link to this function range(start \\ 0, stop \\ -1, redis \\ Verk.Redis)
range(integer(), integer(), GenServer.server()) ::
  {:ok, [Verk.Job.T]} | {:error, Redix.Error.t()}

List jobs from start to stop

Link to this function range!(start \\ 0, stop \\ -1, redis \\ Verk.Redis)
range!(integer(), integer(), GenServer.server()) :: [Verk.Job.T]

List jobs from start to stop, raising if there’s an error