honeydew v1.2.2 Honeydew.Queue behaviour View Source

Link to this section Summary

Link to this section Types

Link to this section Functions

Link to this function cancel(queue_process, job) View Source

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function child_spec(name, args) View Source
child_spec(name(), [any()]) :: Supervisor.child_spec()
Link to this function do_worker_not_ready(worker, state) View Source
Link to this function do_worker_ready(worker, state) View Source
Link to this function enqueue(queue_process, job) View Source
Link to this function filter(queue_process, filter) View Source
Link to this function job_monitor_crashed(job_monitor, reason, state) View Source
Link to this function job_monitor_stopped(job_monitor, state) View Source
Link to this function nack(queue_process, job) View Source
Link to this function worker_crashed(worker, reason, state) View Source
Link to this function worker_not_ready(queue_process) View Source
Link to this function worker_ready(queue_process) View Source
Link to this function worker_stopped(worker, state) View Source

Link to this section Callbacks

Link to this callback cancel(job, private) View Source
cancel(job(), private()) ::
  {:ok | {:error, :in_progress | :not_found}, private()}
Link to this callback enqueue(job, private) View Source
enqueue(job(), private()) :: {private(), job()}
Link to this callback filter(private, filter) View Source
filter(private(), filter()) :: [job()]
Link to this callback handle_call(request, arg1, state) View Source (optional)
handle_call(request :: term(), GenServer.from(), state :: private()) ::
  {:reply, reply, new_state}
  | {:reply, reply, new_state, timeout() | :hibernate}
  | {:noreply, new_state}
  | {:noreply, new_state, timeout() | :hibernate}
  | {:stop, reason, reply, new_state}
  | {:stop, reason, new_state}
when reply: term(), new_state: private(), reason: term()
Link to this callback handle_cast(request, state) View Source (optional)
handle_cast(request :: term(), state :: private()) ::
  {:noreply, new_state}
  | {:noreply, new_state, timeout() | :hibernate}
  | {:stop, reason :: term(), new_state}
when new_state: private()
Link to this callback handle_info(msg, state) View Source (optional)
handle_info(msg :: :timeout | term(), state :: private()) ::
  {:noreply, new_state}
  | {:noreply, new_state, timeout() | :hibernate}
  | {:stop, reason :: term(), new_state}
when new_state: private()
Link to this callback init(name, args) View Source
init(name(), args()) :: {:ok, private()}
Link to this callback nack(job, private) View Source
nack(job(), private()) :: private()
Link to this callback reserve(private) View Source
reserve(private()) :: {job(), private()}
Link to this callback rewrite_opts(args) View Source (optional)
rewrite_opts(args()) :: args()
Link to this callback status(private) View Source
status(private()) :: %{
  :count => number(),
  :in_progress => number(),
  optional(atom()) => any()
}
Link to this callback validate_args!(args) View Source
validate_args!(args()) :: :ok