TaskBunny v0.0.1-dev.6 TaskBunny.Worker
A GenServer that listens a queue and consumes messages.
Summary
Functions
Called when job was done. Acknowledge to RabbitMQ
Initialises GenServer. Send a request for RabbitMQ connection
Starts a worker given a worker’s state
Stops consuming messages from queue. Note this doesn’t terminate the process and the jobs currently running will continue so
Closes the AMQP Channel, when the worker exit is captured
Types
t()
t() :: %TaskBunny.Worker{channel: AMQP.Channel.t | nil, concurrency: integer, consumer_tag: String.t | nil, host: atom, job: atom, job_stats: %{failed: integer, succeeded: integer, rejected: integer}, runners: integer}
Functions
Called when job was done. Acknowledge to RabbitMQ.
Initialises GenServer. Send a request for RabbitMQ connection
start_link(arg1)
start_link({atom, integer}) :: GenServer.on_start
start_link({atom, atom, integer}) :: GenServer.on_start
start_link(t) :: GenServer.on_start
Starts a worker given a worker’s state
Stops consuming messages from queue. Note this doesn’t terminate the process and the jobs currently running will continue so.
Closes the AMQP Channel, when the worker exit is captured.