lib/alephant/publisher/queue.rb in alephant-publisher-queue-1.4.1 vs lib/alephant/publisher/queue.rb in alephant-publisher-queue-2.0.0

- old
+ new

@@ -1,14 +1,14 @@ -require_relative 'env' +require_relative "env" -require 'alephant/publisher/queue/version' -require 'alephant/publisher/queue/options' -require 'alephant/publisher/queue/sqs_helper/queue' -require 'alephant/publisher/queue/sqs_helper/archiver' -require 'alephant/logger' -require 'alephant/publisher/queue/processor' -require 'json' +require "alephant/publisher/queue/version" +require "alephant/publisher/queue/options" +require "alephant/publisher/queue/sqs_helper/queue" +require "alephant/publisher/queue/sqs_helper/archiver" +require "alephant/logger" +require "alephant/publisher/queue/processor" +require "json" module Alephant module Publisher module Queue def self.create(opts = {}, processor = nil) @@ -66,11 +66,16 @@ 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] } + (opts.queue[:aws_account_id].nil? ? {} : { :queue_owner_aws_account_id => opts.queue[:aws_account_id] }).tap do |ops| + logger.info( + "event" => "SQSQueueOptionsConfigured", + "options" => ops, + "method" => "#{self.class}#sqs_queue_options" + ) + end end def aws_queue queue_url = sqs_client.queues.url_for(opts.queue[:sqs_queue_name], sqs_queue_options) sqs_client.queues[queue_url]