40: def main
41: require 'puppet/indirector/catalog/queue'
42: Puppet.notice "Starting puppetqd #{Puppet.version}"
43: Puppet::Resource::Catalog::Queue.subscribe do |catalog|
44:
45:
46:
47: Puppet::Util.benchmark(:notice, "Processing queued catalog for #{catalog.name}") do
48: begin
49: catalog.save
50: rescue => detail
51: puts detail.backtrace if Puppet[:trace]
52: Puppet.err "Could not save queued catalog for #{catalog.name}: #{detail}"
53: end
54: end
55: end
56:
57: Thread.list.each { |thread| thread.join }
58: end