diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-09-05 01:51:23 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-09-05 01:51:23 +0000 |
| commit | 617fe58626aa8a13af10071ca87f66d6363cf058 (patch) | |
| tree | db9974c675c3b73cae56a253386f716e83bc8b6f /lib/puppet/transaction.rb | |
| parent | 8f39318ce46148c3bd483d790c965f277a4eb1c9 (diff) | |
| download | puppet-617fe58626aa8a13af10071ca87f66d6363cf058.tar.gz puppet-617fe58626aa8a13af10071ca87f66d6363cf058.tar.xz puppet-617fe58626aa8a13af10071ca87f66d6363cf058.zip | |
Removing all of the changes I made towards refactoring in the last couple of days. They have all been moved into the sync-retrieve-refactor branch. This branch will soon become 0.19.0, and will not include that refactoring.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1555 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/transaction.rb')
| -rw-r--r-- | lib/puppet/transaction.rb | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/lib/puppet/transaction.rb b/lib/puppet/transaction.rb index d947afbf2..899aaa456 100644 --- a/lib/puppet/transaction.rb +++ b/lib/puppet/transaction.rb @@ -90,7 +90,7 @@ class Transaction # Mark that our change happened, so it can be reversed # if we ever get to that point - unless events.nil? + unless events.nil? or (events.is_a?(Array) and events.empty?) change.changed = true @objectmetrics[:applied] += 1 end @@ -98,15 +98,6 @@ class Transaction events }.flatten.reject { |e| e.nil? } - # If our child responds to a 'flush' method, call it. - if childevents.length > 0 and child.respond_to? :flush - begin - child.flush - rescue => detail - raise Puppet::Error, "Could not flush: %s" % detail, detail.backtrace - end - end - unless changes.empty? # Record when we last synced child.cache(:synced, Time.now) @@ -205,9 +196,6 @@ class Transaction [self.object_id, @count] allevents - ensure - # Unset 'is' everywhere. This is relatively hackish, but, eh. - @objects.each do |o| o.clear end end # Determine whether a given object has failed. @@ -329,9 +317,6 @@ class Transaction # And return the events for collection events }.flatten.reject { |e| e.nil? } - ensure - # Unset 'is' everywhere. This is relatively hackish, but, eh. - @objects.each do |o| o.clear end end # Trigger any subscriptions to a child. This does an upwardly recursive |
