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

Link to this type

conn()
conn() :: pid()

Link to this type

jid()
jid() :: binary()

Link to this section Functions

Link to this function

flush(options \\ [])

Flush (clear) the Faktory db.

All job info will be lost. Checks out a connection from the client pool.

Link to this function

info(options \\ [])

Get info from the Faktory server.

Returns the info as a map (parsed JSON). Checks out a connection from the client pool.

Link to this function

log_level()
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
Link to this function

push(module, args, options \\ [])
push(atom() | binary(), Keyword.t(), [term()]) :: jid()

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], [])
Link to this function

with_conn(options, func)
with_conn(Keyword.t(), (conn() -> term())) :: term()

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.