lib/refinery/queueable.rb in refinery-0.10.2 vs lib/refinery/queueable.rb in refinery-0.10.3
- old
+ new
@@ -9,10 +9,14 @@
end
# Given the queue name and a block, yield the named queue into
# the block.
def with_queue(name, &block)
- yield queue(name)
+ begin
+ yield queue(name)
+ rescue Exception => e
+ logger.error "An error occurred when communicating with queue #{name}: #{e}"
+ end
end
protected
# Get the queue provider. Defaults to RightAws::SqsGen2 running
# in multi-thread mode.
\ No newline at end of file