0.01
No commit activity in last 3 years
No release in over 3 years
The Cloudq Client gem is an awesome client interface to the cloudq a remote job queue engine that allows you to publish jobs and subscribe from jobs anywhere in the cloud....
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 2.5.0

Runtime

>= 0
>= 1.6.1
 Project Readme

Cloudq Client

(In Development Mode)

What is it?

Cloudq is a job queue system that allows you to publish or subscribe to queues anywhere in the cloud.

Cloudq_Client is a ruby implementation of the cloudq protocol that makes publishing jobs and consuming jobs in ruby, very easy.

For more information on the cloudq protocol see http://cloudq.heroku.com

Requirements

You need a cloudq job server, if you do not have a cloudq job server to connect to, then you need to set one up. If you do have a cloudq server, then for this client to work you need the following:

  • Ruby 1.9
  • RubyGems

And the Cloudq Gem depends on the rest-client gem, but it should install when you install the gem.

Install

gem install cloudq_client

How do I publish a job?

require 'cloudq'

Cloudq::Connection.url = 'http://your.cloudq.server'

# Publish Job to a queue called - awesome

Cloudq::Publish(:awesome).job 'Awesome', :type => 'Sauce'

How do I create a worker?

require 'cloudq'

Cloudq::Connection.url = 'http://your.cloudq.server'

# Check Q every 5 seconds
Cloudq::Worker.new(:awesome).run do
  print '.'
  sleep 5
end