summary refs log tree commit homepage
path: root/lib/rainbows/pool_size.rb
blob: 80898691aeee8867c58b1a7d32696f3f5716efc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# -*- encoding: binary -*-
# :stopdoc:
module Rainbows::PoolSize
  DEFAULTS = {
    :pool_size => 50, # same as the default worker_connections
  }

  def setup
    o = Rainbows::O
    DEFAULTS.each { |k,v| o[k] ||= v }
    Integer === o[:pool_size] && o[:pool_size] > 0 or
      raise ArgumentError, "pool_size must a be an Integer > 0"
  end
end