Project

simplejob

0.0
No commit activity in last 3 years
No release in over 3 years
A simple AMQP-backed job queuing system.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

= 0.7.1
>= 1.5.1
 Project Readme

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.