TaskBunny v0.2.2 TaskBunny.Worker

A GenServer that listens a queue and consumes messages.

You don’t have to call or start worker explicity. TaskBunny loads config and starts workers automatically for you.

Summary

Types

t()

Struct that represents a state of the worker GenServer

Functions

Stops consuming messages from queue. Note this doesn’t terminate the process and the jobs currently running will continue so

Types

t()
t() :: %TaskBunny.Worker{channel: AMQP.Channel.t | nil, concurrency: integer, consumer_tag: String.t | nil, host: atom, job_stats: %{failed: integer, succeeded: integer, rejected: integer}, queue: String.t, runners: integer}

Struct that represents a state of the worker GenServer.

Functions

stop_consumer(pid)
stop_consumer(pid) :: :ok

Stops consuming messages from queue. Note this doesn’t terminate the process and the jobs currently running will continue so.