diff options
author | Paul Berry <paul@puppetlabs.com> | 2010-11-30 12:06:52 -0800 |
---|---|---|
committer | Paul Berry <paul@puppetlabs.com> | 2010-11-30 14:39:39 -0800 |
commit | 0747b58bfef9c6bb5f1f9ac1eb6a7b3955dac2af (patch) | |
tree | 2d7273c61a3aa21d4e475f63952450a0376a6b86 /lib/puppet/application/queue.rb | |
parent | f77764de3ace7cc880a77466618a5affe1b61a8e (diff) | |
download | puppet-0747b58bfef9c6bb5f1f9ac1eb6a7b3955dac2af.tar.gz puppet-0747b58bfef9c6bb5f1f9ac1eb6a7b3955dac2af.tar.xz puppet-0747b58bfef9c6bb5f1f9ac1eb6a7b3955dac2af.zip |
Maint: Modified uses of indirector.save to call the indirection directly.
This change replaces calls to <model object>.save with calls to <model
class>.indirection.save(<model object>). This makes the use of the
indirector explicit rather than implicit so that it will be easier to
search for all indirector call sites using grep. This is an
intermediate refactor on the way towards allowing indirector calls to
be explicitly routed to multiple termini.
This patch affects production code.
Diffstat (limited to 'lib/puppet/application/queue.rb')
-rw-r--r-- | lib/puppet/application/queue.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/puppet/application/queue.rb b/lib/puppet/application/queue.rb index c7e0ce8cc..b9e8ca4ca 100644 --- a/lib/puppet/application/queue.rb +++ b/lib/puppet/application/queue.rb @@ -41,12 +41,12 @@ class Puppet::Application::Queue < Puppet::Application require 'puppet/indirector/catalog/queue' # provides Puppet::Indirector::Queue.subscribe Puppet.notice "Starting puppetqd #{Puppet.version}" Puppet::Resource::Catalog::Queue.subscribe do |catalog| - # Once you have a Puppet::Resource::Catalog instance, calling save on it should suffice + # Once you have a Puppet::Resource::Catalog instance, passing it to save should suffice # to put it through to the database via its active_record indirector (which is determined # by the terminus_class = :active_record setting above) Puppet::Util.benchmark(:notice, "Processing queued catalog for #{catalog.name}") do begin - catalog.save + Puppet::Resource::Catalog.indirection.save(catalog) rescue => detail puts detail.backtrace if Puppet[:trace] Puppet.err "Could not save queued catalog for #{catalog.name}: #{detail}" |