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
$ gem install simplejob
Start your RabbitMQ server (install one if necessary).
require "simplejob"
SimpleJob.send("hello")
require "simplejob"
SimpleJob::Worker.start do
handle "hello" do |props|
puts "got it!"
end
end
$ ruby -rubygems producer.rb
$ ruby -rubygems consumer.rb
See the examples directory.