Project

beehive

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Beehive is a lightweight queue system that uses Redis.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0.8.7
>= 2.6.0

Runtime

>= 1.5.1
>= 2.2.0
 Project Readme

Beehive

Beehive is a super lightweight queue system that uses Redis as it's storage engine. Beehive was created because I got fed up with Resque's large memory footprint and not being able to find a decent alternative that wasn't broken.

Requirements

  • Redis and the redis Gem - install with gem install redis
  • The JSON gem - install with gem install json
  • Ruby >= 1.9.2

Installation & Usage

Installing Beehive is done as following:

$ gem install beehive

Once it's installed you can use it as following:

require 'beehive'

client = Beehive::Client.new
client.queue('email.send', :to => 'info@yorickpeterse.com', :subject => 'Hello, world!')

Your worker would look like the following:

require 'beehive'

Beehive.job('email.send') do |params|
  # Do something with Net::IMAP, Net::POP, etc
end

worker = Beehive::Worker.new({}, {:jobs => ['email.send']})
worker.work

For more examples see the "example" directory.

License

Beehive is licensed under the MIT license, a copy of this license can be found in the file "license.txt".