From 5f7d0fbb3699cba28d10adac62c69aedfce2df38 Mon Sep 17 00:00:00 2001 From: Markus Roberts Date: Tue, 2 Nov 2010 11:10:33 -0700 Subject: Fix for #2568 -- Add a dbconnections option to set AR pool size The dbconnection option, if set to a positive integer, will be passed to active record as the connection pool size (pool). --- lib/puppet/rails.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/puppet/rails.rb') diff --git a/lib/puppet/rails.rb b/lib/puppet/rails.rb index 44e7a8343..74805bb6f 100644 --- a/lib/puppet/rails.rb +++ b/lib/puppet/rails.rb @@ -52,6 +52,7 @@ module Puppet::Rails args[:port] = Puppet[:dbport] unless Puppet[:dbport].to_s.empty? args[:username] = Puppet[:dbuser] unless Puppet[:dbuser].to_s.empty? args[:password] = Puppet[:dbpassword] unless Puppet[:dbpassword].to_s.empty? + args[:pool] = Puppet[:dbconnections].to_i unless Puppet[:dbconnections].to_i <= 0 args[:database] = Puppet[:dbname] args[:reconnect]= true @@ -61,6 +62,7 @@ module Puppet::Rails args[:database] = Puppet[:dbname] unless Puppet[:dbname].to_s.empty? args[:username] = Puppet[:dbuser] unless Puppet[:dbuser].to_s.empty? args[:password] = Puppet[:dbpassword] unless Puppet[:dbpassword].to_s.empty? + args[:pool] = Puppet[:dbconnections].to_i unless Puppet[:dbconnections].to_i <= 0 else raise ArgumentError, "Invalid db adapter #{adapter}" end -- cgit