summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorRichard Soderberg <rs@pi007.sv2.upperbeyond.com>2009-08-24 19:57:07 -0700
committerJames Turnbull <james@lovedthanlost.net>2009-11-20 08:07:52 +1100
commitc9f40be6c567d8de328b9d79dde357672323925a (patch)
tree1ed7730149eb8ac9efc26c96934ff7dfda903a5e /ext
parent2d137e2e1ce603ee2727d66b1aba57458bf4d1be (diff)
downloadpuppet-c9f40be6c567d8de328b9d79dde357672323925a.tar.gz
puppet-c9f40be6c567d8de328b9d79dde357672323925a.tar.xz
puppet-c9f40be6c567d8de328b9d79dde357672323925a.zip
Fixed #2568 - Add database option 'dbconnections'
This sets the ActiveRecords connection pool size, when connecting to remote databases (mysql, postgres). default is 0; the 'pool' argument is only passed to ActiveRecords when the value is 1 or greater.
Diffstat (limited to 'ext')
-rw-r--r--ext/puppetstoredconfigclean.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/puppetstoredconfigclean.rb b/ext/puppetstoredconfigclean.rb
index 439d74376..978e08357 100644
--- a/ext/puppetstoredconfigclean.rb
+++ b/ext/puppetstoredconfigclean.rb
@@ -66,6 +66,8 @@ case adapter
args[:database] = pm_conf[:dbname] unless pm_conf[:dbname].to_s.empty?
socket = pm_conf[:dbsocket]
args[:socket] = socket unless socket.to_s.empty?
+ connections = pm_conf[:dbconnections].to_i
+ args[:pool] = connections if connections > 0
else
raise ArgumentError, "Invalid db adapter %s" % adapter
end