1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Document shardable client

This commit is contained in:
Mike Perham 2014-03-24 20:32:12 -07:00
parent 05acd76d79
commit b067250999
2 changed files with 14 additions and 0 deletions

View file

@ -31,6 +31,13 @@ end
``` ```
- **Process Heartbeat** - each Sidekiq process will ping Redis every 5 - **Process Heartbeat** - each Sidekiq process will ping Redis every 5
seconds to give a summary of the Sidekiq population at work. seconds to give a summary of the Sidekiq population at work.
- **Targetable Client** - Sidekiq::Client instances can target different
Redis instances, allowing very large Sidekiq installations to scale by
targeting different jobs to different Redis instances.
```ruby
client = Sidekiq::Client.new(ConnectionPool.new { Redis.new })
client.push(...)
```
- New Chinese, Greek, Swedish and Czech translations for the Web UI. - New Chinese, Greek, Swedish and Czech translations for the Web UI.
- Updated most languages translations for the new UI features. - Updated most languages translations for the new UI features.
- **Remove official Capistrano integration** - this integration has been - **Remove official Capistrano integration** - this integration has been

View file

@ -25,6 +25,13 @@ module Sidekiq
@chain @chain
end end
# Sidekiq::Client normally uses the default Redis pool but you may
# pass a custom ConnectionPool if you want to shard your
# Sidekiq jobs across several Redis instances (for scalability
# reasons, e.g.)
#
# Sidekiq::Client.new(ConnectionPool.new { Redis.new })
#
def initialize(redis_pool = Sidekiq.redis_pool) def initialize(redis_pool = Sidekiq.redis_pool)
@redis_pool = redis_pool @redis_pool = redis_pool
end end