Verk
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
Summary
add_queue(queue, size \\ 25) | Add a new |
enqueue(job, redis \\ Verk.Redis) | Enqueues a Job to the specified queue returning the respective job id |
remove_queue(queue) | Remove |
schedule(job, datetime, redis \\ Verk.Redis) | Schedules a Job to the specified queue returning the respective job id |
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, 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}, 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
args
to perform - a module to perform (
class
) - a valid
jid
Optionally a Redix server can be passed which defaults to Verk.Redis
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, 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}, %Timex.DateTime{calendar: term, day: term, hour: term, millisecond: term, minute: term, month: term, second: term, timezone: term, year: 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
args
to perform - a module to perform (
class
) - a valid
jid
Optionally a Redix server can be passed which defaults to Verk.Redis