Permalink
Browse files

optional pool size in config

  • Loading branch information...
1 parent bd3cf58 commit 4980a1742d2dd6e207a6f448fd74a4d8cb88a809 @igrigorik committed Mar 30, 2011
Showing with 4 additions and 3 deletions.
  1. +2 −0 config.rb
  2. +2 −3 lib/mneme.rb
View
2 config.rb
@@ -6,3 +6,5 @@
config['bits'] = 10
config['hashes'] = 7
config['seed'] = 30
+
+config['pool'] = 2
View
5 lib/mneme.rb
@@ -12,8 +12,6 @@ class Mneme < Goliath::API
include Mnemosyne::Helper
plugin Mnemosyne::Sweeper
- use ::Rack::Reloader, 0 if Goliath.dev?
-
use Goliath::Rack::Params
use Goliath::Rack::DefaultMimeType
use Goliath::Rack::Formatters::JSON
@@ -85,7 +83,8 @@ def filter(n)
hashes: config['hashes']
}
- env[Goliath::Constants::CONFIG][period] = EventMachine::Synchrony::ConnectionPool.new(size: 1) do
+ pool = config['pool'] || 1
+ env[Goliath::Constants::CONFIG][period] = EventMachine::Synchrony::ConnectionPool.new(size: pool) do
BloomFilter::Redis.new(opts)
end
end

0 comments on commit 4980a17

Please sign in to comment.