Skip to content

Commit

Permalink
Set up development logger and debug in uni_updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jgreben committed Dec 14, 2016
1 parent 0cd61d4 commit 4846c95
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/models/uni_updates.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,13 @@ def self.filter_duplicates(item_ids)
duplicates = []
today = Date.parse(Time.zone.now.strftime('%d-%b-%y').upcase)
item_ids.each do |item_id|
logger.info "UNI_UPDATES_QUERY:#{UniUpdates.where(item_id: item_id, load_date: today)}"
if UniUpdates.where(item_id: item_id, load_date: today).empty?
uniques << item_id
else
duplicates << item_id
end
end
logger.info "UNIQUES:#{uniques}"
logger.info "DUPLICATES:#{duplicates}"
[uniques, duplicates]
end
end

0 comments on commit 4846c95

Please sign in to comment.