From 796d882a657565ebb41b7e366751e59b93fc9614 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Sat, 7 Nov 2009 18:00:31 -0600 Subject: Removing last event collection transaction code Signed-off-by: Luke Kanies --- lib/puppet/transaction.rb | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) (limited to 'lib/puppet') 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 -- cgit