TaskBunny v0.1.0-rc.2 TaskBunny.Config

Handles TaskBunny configuration.

Summary

Functions

Returns true if auto start is enabled

Returns connect options for the host

Disable auto start manually

Returns true if worker is disabled

Returns configuration for the host

Returns list of hosts

Returns a queue for the given job

Returns list of queues

Transforms queue configuration into list of workers for the application to run

Functions

auto_start?()
auto_start?() :: boolean

Returns true if auto start is enabled.

connect_options(host)
connect_options(host :: atom) :: list | String.t

Returns connect options for the host.

disable_auto_start()
disable_auto_start() :: :ok

Disable auto start manually.

disable_worker?()
disable_worker?() :: boolean

Returns true if worker is disabled.

host_config(host)
host_config(atom) :: keyword | nil

Returns configuration for the host.

Examples

iex> host_config(:default)
[connection_options: "amqp://localhost?heartbeat=30"]
hosts()
hosts() :: [atom]

Returns list of hosts.

queue_for_job(job)
queue_for_job(atom) :: keyword | nil

Returns a queue for the given job.

queues()
queues() :: [keyword]

Returns list of queues.

workers()
workers() :: [keyword]

Transforms queue configuration into list of workers for the application to run.