diff options
author | Markus Roberts <Markus@reality.com> | 2010-11-02 11:10:33 -0700 |
---|---|---|
committer | Markus Roberts <Markus@reality.com> | 2010-11-10 15:29:13 -0800 |
commit | 5f7d0fbb3699cba28d10adac62c69aedfce2df38 (patch) | |
tree | 0db3a42023237180b3b295db83773d6e751075e8 /lib/puppet/rails.rb | |
parent | ba4d22bce3fbb7af3bef50088623605350a9891e (diff) | |
download | puppet-5f7d0fbb3699cba28d10adac62c69aedfce2df38.tar.gz puppet-5f7d0fbb3699cba28d10adac62c69aedfce2df38.tar.xz puppet-5f7d0fbb3699cba28d10adac62c69aedfce2df38.zip |
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).
Diffstat (limited to 'lib/puppet/rails.rb')
-rw-r--r-- | lib/puppet/rails.rb | 2 |
1 files changed, 2 insertions, 0 deletions
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 |