Verk v0.13.4 Verk.QueueStatsCounters

This module is responsible for abstracting the logic of keeping counters for each queue.

Summary

Functions

It outputs the current stats about each queue and total

Initializes the ets tables for the queue stats

Saves processed and failed total counts to Redis

Updates the counters according to the event that happened

It Resets the started counter of a queue

Functions

all()

It outputs the current stats about each queue and total

init()

Specs

init :: :ok

Initializes the ets tables for the queue stats.

persist()

Specs

persist :: :ok | {:error, term}

Saves processed and failed total counts to Redis.

register(atom, queue)

Specs

register(:started | :finished | :failed, binary) :: integer

Updates the counters according to the event that happened.

reset_started(queue)

Specs

reset_started(binary) :: :ok

It Resets the started counter of a queue