Skip to content

stormsw/rcelery

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RCelery: celery for Ruby

RCelery is a Ruby port of [celery] (http://github/ask/celery), the distributed task queue for python. It does not support all of the features of celery, but does interoperate well with it, as long as both sides use the AMQP backend and json serializer.

Example

Note: To run the example as-is, rabbitmq must be running and accepting connections on localhost port 5672. Access must be allowed to the default vhost for the default username and password.

tasks.rb:

require 'rubygems'
require 'rcelery'

module Tasks
  include RCelery::TaskSupport

  task(:ignore_result => false)
  def subtract(a,b)
    a-b
  end
end

client.rb:

require 'rubygems'
require 'rcelery'
require 'tasks'

RCelery.start

include Tasks

difference = subtract.delay(1,2)
puts "Subtract Result: #{difference.wait}"

Run the example:

$ ruby rceleryd -t tasks.rb &
$ ruby client.rb

See the RCelery docmentation for more information.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 94.1%
  • Shell 4.1%
  • Python 1.8%