lib/alephant/publisher/queue.rb in alephant-publisher-queue-1.1.0 vs lib/alephant/publisher/queue.rb in alephant-publisher-queue-1.2.0
- old
+ new
@@ -9,18 +9,18 @@
require 'json'
module Alephant
module Publisher
module Queue
- include Logger
-
def self.create(opts = {}, processor = nil)
processor ||= Processor.new(opts.writer)
Publisher.new(opts, processor)
end
class Publisher
+ include Logger
+
VISIBILITY_TIMEOUT = 60
RECEIVE_WAIT_TIME = 15
attr_reader :queue, :executor, :opts, :processor
@@ -56,10 +56,11 @@
def sqs_client
@sqs_client ||= AWS::SQS.new
end
def sqs_queue_options
+ logger.info "Publisher::Queue::Publisher#sqs_queue_options: AWS Account ID '#{opts.queue[:aws_account_id]}'"
opts.queue[:aws_account_id].nil? ? {} : { :queue_owner_aws_account_id => opts.queue[:aws_account_id] }
end
def aws_queue
queue_url = sqs_client.queues.url_for(opts.queue[:sqs_queue_name], sqs_queue_options)
@@ -67,6 +68,5 @@
end
end
end
end
end
-