diff options
Diffstat (limited to 'lib/tasks/subscriptions.rake')
-rw-r--r-- | lib/tasks/subscriptions.rake | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/lib/tasks/subscriptions.rake b/lib/tasks/subscriptions.rake deleted file mode 100644 index 77cbd94d3..000000000 --- a/lib/tasks/subscriptions.rake +++ /dev/null @@ -1,13 +0,0 @@ -namespace :subscriptions do - - desc "For all remote accounts that have no local followers, unsubscribe from PuSH" - task clear: :environment do - accounts = Account.where('(select count(f.id) from follows as f where f.target_account_id = accounts.id) = 0').where.not(domain: nil) - - accounts.each do |a| - a.subscription('').unsubscribe - a.update!(verify_token: '', secret: '') - end - end - -end |