Only run mastodon:push:clear on accounts that are still subscribed to

This commit is contained in:
Eugen Rochko 2016-10-18 12:23:38 +02:00
parent 683c42724f
commit 625056fa47

View 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