Skip to content

kenpratt/simplejob

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Painless job queueing, backed by AMQP.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages