Verk v1.7.0 Verk.QueueStats

This process will update an :ets table with the following information per queue

  • Current amount of running jobs
  • Amount of finished jobs
  • Amount of failed jobs

It will persist to redis from time to time

It also holds information about the current status of queus. They can be:

  • running
  • idle
  • pausing
  • paused

Link to this section Summary

Functions

Lists the queues and their stats searching for a prefix if provided

Invoked to handle synchronous call/3 messages.

Invoked on :producer_consumer and :consumer stages to handle events.

Link to this section Functions

Link to this function

all(prefix \\ "")
all(binary()) :: Map.t()

Lists the queues and their stats searching for a prefix if provided

Link to this function

handle_call(arg, from, state)

Invoked to handle synchronous call/3 messages.

call/3 will block until a reply is received (unless the call times out or nodes are disconnected).

request is the request message sent by a call/3, from is a two-element tuple containing the caller's PID and a term that uniquely identifies the call, and state is the current state of the GenStage.

Returning {:reply, reply, [events], new_state} sends the response reply to the caller after events are dispatched (or buffered) and continues the loop with new state new_state. In case you want to deliver the reply before processing events, use reply/2 and return {:noreply, [event], state}.

Returning {:noreply, [event], new_state} does not send a response to the caller and processes the given events before continuing the loop with new state new_state. The response must be sent with reply/2.

Hibernating is also supported as an atom to be returned from either :reply and :noreply tuples.

Returning {:stop, reason, reply, new_state} stops the loop and terminate/2 is called with reason reason and state new_state. Then the reply is sent as the response to the call and the process exits with reason reason.

Returning {:stop, reason, new_state} is similar to {:stop, reason, reply, new_state} except that no reply is sent to the caller.

If this callback is not implemented, the default implementation by use GenStage will return {:stop, {:bad_call, request}, state}.

Callback implementation for GenStage.handle_call/3.

Link to this function

handle_events(events, from, state)

Invoked on :producer_consumer and :consumer stages to handle events.

Must always be explicitly implemented by such types.

Return values are the same as c:handle_cast/2.

Callback implementation for GenStage.handle_events/3.