https://github.com/endel/resque-swapper
Swapping tool for Resque server on runtime.
https://github.com/endel/resque-swapper
Last synced: 8 months ago
JSON representation
Swapping tool for Resque server on runtime.
- Host: GitHub
- URL: https://github.com/endel/resque-swapper
- Owner: endel
- License: mit
- Created: 2011-08-06T17:21:05.000Z (almost 15 years ago)
- Default Branch: master
- Last Pushed: 2012-06-20T01:23:35.000Z (almost 14 years ago)
- Last Synced: 2025-08-21T15:57:45.839Z (10 months ago)
- Language: Ruby
- Homepage:
- Size: 114 KB
- Stars: 4
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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.