summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/interpreter.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/parser/interpreter.rb')
-rw-r--r--lib/puppet/parser/interpreter.rb24
1 files changed, 15 insertions, 9 deletions
diff --git a/lib/puppet/parser/interpreter.rb b/lib/puppet/parser/interpreter.rb
index 9bc1cca43..8ce85a666 100644
--- a/lib/puppet/parser/interpreter.rb
+++ b/lib/puppet/parser/interpreter.rb
@@ -268,21 +268,27 @@ module Puppet
fork {
# We store all of the objects, even the collectable ones
benchmark(:info, "Stored configuration for #{client}") do
+ # Try to batch things a bit, by putting them into
+ # a transaction
+ Puppet::Rails::Host.transaction do
+ Puppet::Rails::Host.store(
+ :objects => objects,
+ :host => client,
+ :facts => facts
+ )
+ end
+ end
+ }
+ else
+ # We store all of the objects, even the collectable ones
+ benchmark(:info, "Stored configuration for #{client}") do
+ Puppet::Rails::Host.transaction do
Puppet::Rails::Host.store(
:objects => objects,
:host => client,
:facts => facts
)
end
- }
- else
- # We store all of the objects, even the collectable ones
- benchmark(:info, "Stored configuration for #{client}") do
- Puppet::Rails::Host.store(
- :objects => objects,
- :host => client,
- :facts => facts
- )
end
end