Skip to content

Commit

Permalink
report total number of dois not indexed. #690
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Jan 4, 2021
1 parent d506906 commit c4bece9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/models/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,12 @@ def self.export_doi_counts(query: nil)

csv = [CSV.generate_line(headers)] + rows

Rails.logger.warn "Found #{csv.size - 1} repositories with missing DOIs."
total_missing = rows.reduce(0) do |sum, row|
sum = sum + row.split(",").last.to_i
sum
end

Rails.logger.warn "Found #{csv.size - 1} repositories with #{total_missing} missing DOIs."

csv.join("")
end
Expand Down

0 comments on commit c4bece9

Please sign in to comment.