summaryrefslogtreecommitdiffstats
path: root/lib/puppet/application/queue.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/application/queue.rb')
-rw-r--r--lib/puppet/application/queue.rb77
1 files changed, 75 insertions, 2 deletions
diff --git a/lib/puppet/application/queue.rb b/lib/puppet/application/queue.rb
index b9e8ca4ca..de8aea32a 100644
--- a/lib/puppet/application/queue.rb
+++ b/lib/puppet/application/queue.rb
@@ -15,13 +15,13 @@ class Puppet::Application::Queue < Puppet::Application
# Do an initial trap, so that cancels don't get a stack trace.
# This exits with exit code 1
- trap(:INT) do
+ Signal.trap(:INT) do
$stderr.puts "Caught SIGINT; shutting down"
exit(1)
end
# This is a normal shutdown, so code 0
- trap(:TERM) do
+ Signal.trap(:TERM) do
$stderr.puts "Caught SIGTERM; shutting down"
exit(0)
end
@@ -37,6 +37,79 @@ class Puppet::Application::Queue < Puppet::Application
option("--debug","-d")
option("--verbose","-v")
+ def help
+ <<-HELP
+
+puppet-queue(8) -- Queuing daemon for asynchronous storeconfigs
+========
+
+SYNOPSIS
+--------
+Retrieves serialized storeconfigs records from a queue and processes
+them in order.
+
+
+USAGE
+-----
+puppet queue [-d|--debug] [-v|--verbose]
+
+
+DESCRIPTION
+-----------
+This application runs as a daemon and processes storeconfigs data,
+retrieving the data from a stomp server message queue and writing it to
+a database.
+
+For more information, including instructions for properly setting up
+your puppet master and message queue, see the documentation on setting
+up asynchronous storeconfigs at:
+http://projects.puppetlabs.com/projects/1/wiki/Using_Stored_Configuration
+
+
+OPTIONS
+-------
+Note that any configuration parameter that's valid in the configuration
+file is also a valid long argument. For example, 'server' is a valid
+configuration parameter, so you can specify '--server <servername>' as
+an argument.
+
+See the configuration file documentation at
+http://docs.puppetlabs.com/references/stable/configuration.html for the
+full list of acceptable parameters. A commented list of all
+configuration options can also be generated by running puppet queue with
+'--genconfig'.
+
+* --debug:
+ Enable full debugging.
+
+* --help:
+ Print this help message
+
+* --verbose:
+ Turn on verbose reporting.
+
+* --version:
+ Print the puppet version number and exit.
+
+
+EXAMPLE
+-------
+ $ puppet queue
+
+
+AUTHOR
+------
+Luke Kanies
+
+
+COPYRIGHT
+---------
+Copyright (c) 2009 Puppet Labs, LLC Licensed under the GNU Public
+License
+
+ HELP
+ end
+
def main
require 'puppet/indirector/catalog/queue' # provides Puppet::Indirector::Queue.subscribe
Puppet.notice "Starting puppetqd #{Puppet.version}"