Created
December 14, 2022 15:38
-
-
Save ashfurrow/f8d6b103a21f4e17c71657f4000fdbac to your computer and use it in GitHub Desktop.
Revisions
-
ashfurrow created this gist
Dec 14, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ irb(main):026:1* def perform_total_query(domain) irb(main):027:1* Follow.joins(:account).merge(Account.where(domain: domain)).count irb(main):028:0> end irb(main):026:0> inboxes = Account.inboxes irb(main):026:0> zero_inboxes = inboxes.select {|i| perform_total_query(i.gsub("https://", '').gsub( "http://", "").gsub("/inbox", "")) == 0} # lol whatever irb(main):025:0> zero_inboxes.count => 12916 irb(main):026:0> inboxes.count => 14895