Exq.Adapters.Queue behaviour (exq v0.19.0) View Source
Behaviour for creating Exq queue adapters.
Example
defmodule Exq.Adapters.Queue.CustomAdapter do
@behaviour Exq.Adapters.Queue
def enqueue(pid, queue, worker, args, options) do
{:ok, apply(worker, :perform, args)}
end
def enqueue_at(pid, queue, time, worker, args, options) do
enqueue_somehow(pid, queue, time, worker, args, options)
end
def enqueue_in(pid, queue, offset, worker, args, options) do
enqueue_in_somehow(pid, queue, offset, worker, args, options)
end
end
Link to this section Summary
Link to this section Types
Specs
The GenServer name
Specs
The server reference