Skip to content

Commit

Permalink
DEV: add more counts to analyze missing
Browse files Browse the repository at this point in the history
  • Loading branch information
SamSaffron committed Aug 12, 2020
1 parent 1f7f8ee commit ec173a7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/tasks/uploads.rake
Expand Up @@ -1037,6 +1037,18 @@ def analyze_missing
if count > 0
puts "Found #{count} uploaded avatars"
end
count = DB.query_single(<<~SQL, ids: ids).first
SELECT COUNT(*) FROM user_avatars WHERE gravatar_upload_id IN (:ids)
SQL
if count > 0
puts "Found #{count} gravatars"
end
count = DB.query_single(<<~SQL, ids: ids).first
SELECT COUNT(*) FROM user_avatars WHERE custom_upload_id IN (:ids)
SQL
if count > 0
puts "Found #{count} custom uploaded avatars"
end
end

end
Expand Down

0 comments on commit ec173a7

Please sign in to comment.