Painless job queueing, backed by AMQP.
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples
lib
test
.document
.gitignore
LICENSE.txt
README.md
Rakefile
VERSION
simplejob.gemspec

README.md

simplejob

Painless job queueing, backed by AMQP.

  • Super simple interface
  • Robust jobs that never get lost
  • Jobs don't get marked complete until they are finished (they survive reboots/kill -9)
  • One work queue per worker pool, with one or more job names mapped to each work queue (for easy monitoring)
  • Jobs which throw exceptions are logged and removed, preventing infinite job-retry loops

Installation

$ gem install simplejob

Example

Start your RabbitMQ server (install one if necessary).

Producer

require "simplejob"

SimpleJob.send("hello")

Consumer

require "simplejob"

SimpleJob::Worker.start do
  handle "hello" do |props|
    puts "got it!"
  end
end

Run

$ ruby -rubygems producer.rb
$ ruby -rubygems consumer.rb

More examples

See the examples directory.