lib/alephant/lookup/lookup_query.rb in alephant-lookup-0.3.0 vs lib/alephant/lookup/lookup_query.rb in alephant-lookup-0.4.0

- old
+ new

@@ -1,23 +1,26 @@ require "crimp" require "alephant/lookup/lookup_location" +require "alephant/logger" module Alephant module Lookup class LookupQuery + include Logger attr_reader :table_name, :lookup_location def initialize(table_name, component_id, opts, batch_version) @client = AWS::DynamoDB::Client::V20120810.new @table_name = table_name @lookup_location = LookupLocation.new(component_id, opts, batch_version) + logger.info "LookupQuery#initialize: table name '#{table_name}', component id '#{component_id}', batch version '#{batch_version}', location '#{lookup_location}'" end def run! lookup_location.tap do |l| l.location = s3_location_from( @client.query(to_q) - ) + ).tap { |loc| logger.info "LookupQuery#run!: location '#{loc}'" } end end private