mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Default redis pool size to concurrency + 2, fixes #116
This commit is contained in:
parent
16fa99c875
commit
a587be0bd7
1 changed files with 3 additions and 1 deletions
|
@ -6,7 +6,9 @@ module Sidekiq
|
|||
class RedisConnection
|
||||
def self.create(options={})
|
||||
url = options[:url] || ENV['REDISTOGO_URL'] || 'redis://localhost:6379/0'
|
||||
size = (options[:size] || Sidekiq.options[:concurrency] || 25)
|
||||
# need a connection for Fetcher and Retry
|
||||
size = options[:size] || (Sidekiq.options[:concurrency] + 2)
|
||||
|
||||
ConnectionPool.new(:timeout => 1, :size => size) do
|
||||
build_client(url, options[:namespace])
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue