No commit activity in last 3 years
No release in over 3 years
Allowing Resque to handle queues accross multiple Redis instances
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
>= 0

Runtime

>= 0
 Project Readme

resque_redis_composite

This gems allows Resque to handle queues located on seperate Redis servers.

Requirements

Currently working with Resque 1.23.x and 1.24.x I haven't looked into Resque 2 yet, but it might be possible to natively handle multiple Redis instances with the new Resque::Backend class.

Install & Setup

Configure Resque in your application:

Resque.after_fork do |job|
  Resque::RedisComposite.reconnect_all(job)
end

Usage

config = {
  "default" => "localhost:6379",
  "some_other_queue" => "otherbox:6379"
}

Resque.redis = Resque::RedisComposite.create(config)

Alternatively, config can be one of :

  • a single connection string, it will become the default connection:

    config = "localhost:6379"

  • a hash with any combination of server values supported by Resque:

    • a Redis connection url : redis://...
    • a Redis client : Redis.new(:host => ..., :port => ...)
    • a Redis namespace : Redis::Namespace(..., :redis => ...)

Notes

Resque Stats will always be stored on the default Redis server.

TODO

  • Keep an eye out for Resque 2.0 and evalute if this gems is still going to be useful
  • Review specs

Authors

Original work done by Dave Hoover and jiHyunBae.

Updated and made into a gem by Anthony Powles.