]> cat aescling's git repositories - mastodon.git/commitdiff
Only run mastodon:push:clear on accounts that are still subscribed to
authorEugen Rochko <eugen@zeonfederated.com>
Tue, 18 Oct 2016 10:23:38 +0000 (12:23 +0200)
committerEugen Rochko <eugen@zeonfederated.com>
Tue, 18 Oct 2016 10:23:38 +0000 (12:23 +0200)
lib/tasks/mastodon.rake

index aa07c07385ad6e8d789f0ad4a76ab4ab36399775..78def7b5158e4d84a9095adafc92ee4e80766656 100644 (file)
@@ -13,7 +13,7 @@ namespace :mastodon do
     task clear: :environment do
       include RoutingHelper
 
-      Account.remote.without_followers.find_each do |a|
+      Account.remote.without_followers.where.not(subscription_expires_at: nil).find_each do |a|
         Rails.logger.debug "PuSH unsubscribing from #{a.acct}"
 
         begin