Removing class methods and such, and switching to
relying solely on a setting for the queue configuration.

Signed-off-by: Luke Kanies <[email protected]>
---
 lib/puppet/defaults.rb         |    3 ++-
 lib/puppet/indirector/queue.rb |    1 -
 lib/puppet/util/queue.rb       |   14 ++++----------
 3 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb
index e34d945..5de85ed 100644
--- a/lib/puppet/defaults.rb
+++ b/lib/puppet/defaults.rb
@@ -150,7 +150,8 @@ module Puppet
             but then ship with tools that do not know how to handle signed 
ints, so the UIDs show up as
             huge numbers that can then not be fed back into the system.  This 
is a hackish way to fail in a
             slightly more useful way when that happens."],
-        :node_terminus => ["plain", "Where to find information about nodes."]
+        :node_terminus => ["plain", "Where to find information about nodes."],
+        :queue_type => ["stomp", "Which type of queue to use for asynchronous 
processing."]
     )
 
     hostname = Facter["hostname"].value
diff --git a/lib/puppet/indirector/queue.rb b/lib/puppet/indirector/queue.rb
index c58af98..91e4317 100644
--- a/lib/puppet/indirector/queue.rb
+++ b/lib/puppet/indirector/queue.rb
@@ -20,7 +20,6 @@ require 'yaml'
 # creation is automatic and not a concern).
 class Puppet::Indirector::Queue < Puppet::Indirector::Terminus
     extend ::Puppet::Util::Queue
-    self.queue_type_default = :stomp
 
     # Queue has no idiomatic "find"
     def find(request)
diff --git a/lib/puppet/util/queue.rb b/lib/puppet/util/queue.rb
index 3724bab..f73f75f 100644
--- a/lib/puppet/util/queue.rb
+++ b/lib/puppet/util/queue.rb
@@ -23,9 +23,6 @@ require 'puppet/util/instance_loader'
 #   class Queue::Fue
 #       # mix it in at the class object level rather than instance level
 #       extend ::Puppet::Util::Queue
-#
-#       # specify the default client type to use.
-#       self.queue_type_default = :special_magical_type
 #   end
 #
 # Queue::Fue instances can get a message queue client through the registry 
through the mixed-in method
@@ -38,7 +35,6 @@ require 'puppet/util/instance_loader'
 # * _queue_ names are simple names independent of the message broker or client 
library.  No "/queue/" prefixes like in Stomp::Client.
 module Puppet::Util::Queue
     extend Puppet::Util::InstanceLoader
-    attr_accessor :queue_type_default
     instance_load :queue_clients, 'puppet/util/queue'
 
     # Adds a new class/queue-type pair to the registry.  The _type_ argument 
is optional; if not provided,
@@ -84,13 +80,11 @@ module Puppet::Util::Queue
     end
 
     # The class object for the client to be used, determined by queue 
configuration
-    # settings and known queue client types.
-    # Looked to the <tt>:queue_client</tt> configuration entry in the running 
application for
-    # the default queue type to use, and fails over to +queue_type_default+ if 
the configuration
-    # information is not present.
+    # settings.
+    # Looks to the <tt>:queue_type</tt> configuration entry in the running 
application for
+    # the default queue type to use.
     def client_class
-         Puppet::Util::Queue.queue_type_to_class(Puppet[:queue_client] || 
queue_type_default)
-        # Puppet::Util::Queue.queue_type_to_class(Puppet[:queue_client] || 
:stomp)
+         Puppet::Util::Queue.queue_type_to_class(Puppet[:queue_type])
     end
 
     # Returns (instantiating as necessary) the singleton queue client 
instance, according to the
-- 
1.6.1


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to