Verk (Verk v1.7.3) View Source
Verk is a job processing system that integrates well with Sidekiq jobs.
Each queue will have a pool of workers handled by poolboy that will process jobs.
Verk has a retry mechanism similar to Sidekiq that keeps retrying the jobs with a reasonable backoff.
It has an API that provides information about the queues.
Link to this section Summary
Functions
Add a new queue with a pool of size size of workers.
Enqueues a Job to the specified queue returning the respective job id.
Remove queue from the list of queues that are being processed.
Schedules a Job to the specified queue returning the respective job id.
Link to this section Functions
Specs
add_queue(atom(), pos_integer()) :: Supervisor.on_start_child()
Add a new queue with a pool of size size of workers.
Specs
enqueue(
%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()
},
GenServer.server()
) :: {:ok, binary()} | {:error, term()}
Enqueues a Job to the specified queue returning the respective job id.
The job must have:
- a valid
queue - a list of
argsto perform - a module to perform (
class) - a valid
jid
Optionally a Redix server can be passed which defaults to Verk.Redis.
See Verk.Manager.pause/1.
Specs
remove_queue(atom()) :: :ok | {:error, :not_found}
Remove queue from the list of queues that are being processed.
Specs
schedule(
%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()
},
%DateTime{
calendar: term(),
day: term(),
hour: term(),
microsecond: term(),
minute: term(),
month: term(),
second: term(),
std_offset: term(),
time_zone: term(),
utc_offset: term(),
year: term(),
zone_abbr: term()
},
GenServer.server()
) :: {:ok, binary()} | {:error, term()}
Schedules a Job to the specified queue returning the respective job id.
The job must have:
- a valid
queue - a list of
argsto perform - a module to perform (
class) - a valid
jid
Optionally a Redix server can be passed which defaults to Verk.Redis.