Swapping tool for Resque server on runtime.
Ruby
Latest commit 984953b Jun 20, 2012 @endel Bump version 0.1.2
Permalink
Failed to load latest commit information.
lib Bump version 0.1.2 Jun 20, 2012
tests Swap back on exception Jun 14, 2012
.gitignore Update README. Jan 4, 2012
Gemfile Add Gemfile Jun 14, 2012
Gemfile.lock Add Gemfile Jun 14, 2012
LICENSE Configure gemspec. Aug 5, 2011
README.md Update README. Jan 4, 2012
resque-swapper.gemspec Bump version 0.1.2 Jun 20, 2012

README.md

resque-swapper

Allows to configure and Resque servers to swap them on runtime.

Configuration

Create a config/resque.yml for your project, like this:

production:
  localhost:
    host: localhost
    port: 6379
  another:
    host: 192.168.1.5
    port: 6379
development:
  localhost:
    host: localhost
    port: 6379
  another:
    host: localhost
    port: 6380

How to use

Swaping temporarily:

require 'resque-swapper'
require 'resque-remote'

Resque.swap(:another) do |resque|
	resque.remote_enqueue('SomeJob', :queue, 'foo')
end

Direct swap:

require 'resque-swapper'

Resque.swap(:another)
Resque.enqueue(Something, 'foo')

License

resque-swapper is released under MIT License. Please see LICENSE file.