lib/toiler/actor/fetcher.rb in toiler-0.3.1.beta2 vs lib/toiler/actor/fetcher.rb in toiler-0.3.1.beta3
- old
+ new
@@ -8,11 +8,11 @@
include Utils::ActorLogging
FETCH_LIMIT = 10
attr_accessor :queue, :wait, :visibility_timeout, :free_processors,
- :scheduled, :executing
+ :scheduled, :executing, :polling
def initialize(queue, client)
debug "Initializing Fetcher for queue #{queue}..."
@queue = Toiler::Aws::Queue.new queue, client
@wait = Toiler.options[:wait] || 20
@@ -32,10 +32,10 @@
def on_message(msg)
executing.make_true
method, *args = msg
send(method, *args)
rescue StandardError => e
- error "Fetcher #{queue.name} raised exception #{e.class}"
+ error "Fetcher #{queue.name} raised exception #{e.class}: #{e.message}\n#{e.backtrace.join("\n")}"
ensure
executing.make_false
end
def executing?