faktory_worker_ex v0.7.1 Faktory
Some utility functions and such. See README for general usage.
Link to this section Summary
Functions
Flush (clear) the Faktory db
Get info from the Faktory server
Return the log level
Lower level enqueing function
Need a raw connection to the Faktory server?
Link to this section Types
conn()
conn() :: pid()
conn() :: pid()
jid()
jid() :: binary()
jid() :: binary()
Link to this section Functions
app_name()
env()
flush(options \\ [])
Flush (clear) the Faktory db.
All job info will be lost. Checks out a connection from the client pool.
info(options \\ [])
Get info from the Faktory server.
Returns the info as a map (parsed JSON). Checks out a connection from the client pool.
log_level()
log_level() :: atom()
log_level() :: atom()
Return the log level.
The log level can be set to anything greater than or equal to Logger's level.
use Mix.Config
config faktory_worker_ex, log_level: :info
push(module, args, options \\ [])
Lower level enqueing function.
perform_async
delgates to this. module
can be either an atom or string.
A connection is checked out from the client pool.
Ex:
push(MyFunWork, [queue: "somewhere"], [1, 2])
push("BoringWork", [retry: 0, backtrace: 10], [])
with_conn(options, func)
Need a raw connection to the Faktory server?
This checks one out, passes it to the given function, then checks it back
in. See the (undocument) Faktory.Protocol
module for what you can do
with a connection.