summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-11-07 18:00:31 -0600
committertest branch <puppet-dev@googlegroups.com>2010-02-17 06:50:53 -0800
commit796d882a657565ebb41b7e366751e59b93fc9614 (patch)
tree1defce1c47fe634bc2aba160437747b1479b308d /lib/puppet
parente838bccaee658847e1b2dac5b7e2191a8148202c (diff)
downloadpuppet-796d882a657565ebb41b7e366751e59b93fc9614.tar.gz
puppet-796d882a657565ebb41b7e366751e59b93fc9614.tar.xz
puppet-796d882a657565ebb41b7e366751e59b93fc9614.zip
Removing last event collection transaction code
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/transaction.rb31
1 files changed, 18 insertions, 13 deletions
diff --git a/lib/puppet/transaction.rb b/lib/puppet/transaction.rb
index 7e478abb2..dd28b5588 100644
--- a/lib/puppet/transaction.rb
+++ b/lib/puppet/transaction.rb
@@ -209,21 +209,26 @@ class Puppet::Transaction
Puppet.info "Applying configuration version '%s'" % catalog.version if catalog.version
- allevents = @sorted_resources.collect { |resource|
- if resource.is_a?(Puppet::Type::Component)
- Puppet.warning "Somehow left a component in the relationship graph"
- next
- end
- ret = nil
- seconds = thinmark do
- ret = eval_resource(resource)
- end
+ begin
+ @sorted_resources.each do |resource|
+ if resource.is_a?(Puppet::Type::Component)
+ Puppet.warning "Somehow left a component in the relationship graph"
+ next
+ end
+ ret = nil
+ seconds = thinmark do
+ ret = eval_resource(resource)
+ end
- if Puppet[:evaltrace] and @catalog.host_config?
- resource.info "Evaluated in %0.2f seconds" % seconds
+ if Puppet[:evaltrace] and @catalog.host_config?
+ resource.info "Evaluated in %0.2f seconds" % seconds
+ end
+ ret
end
- ret
- }.flatten.reject { |e| e.nil? }
+ ensure
+ # And then close the transaction log.
+ Puppet::Util::Log.close(@report)
+ end
Puppet.debug "Finishing transaction #{object_id} with #{@changes.length} changes"
end