This Gem is outdated.
How configure sidekiq for redis sentinel, See: https://github.com/mperham/sidekiq/wiki/Advanced-Options#complete-control
The Sidekiq CLI will be used a Redis Sentinel cluster.
When Sidekiq.config has a key which named sentinel
, the sidekiq client will use redis sentinel cluster as backend.
- sidekiq https://github.com/mperham/sidekiq
- redis-sentinel https://github.com/flyerhzm/redis-sentinel
Add this line to your application's Gemfile:
gem 'sidekiq_sentinel'
And then execute:
$ bundle
Or install it yourself as:
$ gem install sidekiq_sentinel
- Put your redis sentinel cluster informations to YAML file.
- Run sidekiq with
-C
option
# Sample configuration file for Sidekiq.
# Options here can still be overridden by cmd line args.
# sidekiq -C config.yml
---
:sentinel:
:master_name: example-test
:sentinels:
- :host: localhost
:port: 26379
- :host: localhost
:port: 26380
:verbose: true
:pidfile: ./sidekiq.pid
:concurrency: 5
:queues:
- [often, 7]
- [default, 5]
- [seldom, 3]
There are two files for testing.
- examples/config.yml (forked from sidekiq project)
- examples/sinkiq.rb (forked from sidekiq project)
You can setup redis sentinel cluster with redis-sentinel project examples.
- Setup redis sentinel cluster and watch redis with MONITOR API.
- Run sidekiq worker
bundle exec sidekiq -C ./examples/config.yml -r examples/sinkiq.rb
- Run sinatra server
bundle exec ruby examples/sinkiq.rb
- Post messages from sinatra(http://localhost:4567)
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Created and maintained by Yukihiko Sawanobori ([email protected])
MIT (see LICENSE)