Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 837 Bytes

README.md

File metadata and controls

35 lines (24 loc) · 837 Bytes

Exq

Build Status

Exq is a job processing libarry compatible with Resque / Sidekiq for the Elixir language.

Example Usage:

Start process with with:

{:ok, pid} = Exq.start

# Or with config (see source for all options)
{:ok, pid} = Exq.start([host: '127.0.0.1', port: 6379, namespace: 'x'])

To enqueue jobs:

{:ok, ack} = Exq.enqueue(pid, "default", "MyWorker", ["arg1", "arg2"])

{:ok, ack} = Exq.enqueue(pid, "default", "MyWorker/custom_method", [])

By default, the perform method will be called. However, you can pass a method such as MyWorker/custom_method

Example Worker:

defmodule MyWorker do
  def perform do
    # will get called if no custom method passed in
  end
end