Module: SQSPoller::Handler

Defined in:
lib/sqspoller/handler.rb,
lib/sqspoller/handlers/debug.rb,
lib/sqspoller/handlers/puppetsdb.rb

Defined Under Namespace

Classes: Debug, Puppetsdb

Class Method Summary collapse

Class Method Details

.process(queue_name, msg) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/sqspoller/handler.rb', line 4

def process(queue_name, msg)
  if Config['sqspoller']['queues'][queue_name]['handlers']
    Config['sqspoller']['queues'][queue_name]['handlers'].keys.each do |handler_name|
      handler = Handler.const_get(handler_name.capitalize).new
      handler_config = Config['sqspoller']['queues'][queue_name]['handlers'][handler_name]
      handler.process(queue_name, msg, handler_config)
    end
  end
end