Class: SQSPoller::CLI

Inherits:
Object
  • Object
show all
Defined in:
lib/sqspoller/cli.rb

Class Method Summary collapse

Class Method Details

.runObject



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/sqspoller/cli.rb', line 8

def run
  Daemons.run_proc('sqspoller', 
                   options = {:dir_mode   => :system,
                              :backtrace  => true,
                              :monitor    => true,
                              :log_output => true,
                   }
  ) do
    sqspoller = SQSPoller.new
    sqspoller.poll_queues { |queue_name, msg| sqspoller.process(queue_name, msg) }
  end
end