about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-10-18 12:23:38 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-10-18 12:23:38 +0200
commit6f7c9774c776afeea0d98cbbd30483f4f0c6b938 (patch)
tree0107e03a1f716bb6e4facd0e57b10b23d88bf825
parent2e0a38d07c4611b1f2817cd70f6e95ca6b772ec2 (diff)
Only run mastodon:push:clear on accounts that are still subscribed to
-rw-r--r--lib/tasks/mastodon.rake2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tasks/mastodon.rake b/lib/tasks/mastodon.rake
index aa07c0738..78def7b51 100644
--- a/lib/tasks/mastodon.rake
+++ b/lib/tasks/mastodon.rake
@@ -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