From 6ddf0432e71aea7c62f1ee7946da5538d2526a13 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 3 Dec 2018 01:32:08 +0100 Subject: Improve account suspension speed and completeness (#9290) - Some associations were missing from the clean-up - Some attributes were not reset on suspension - Skip federation and streaming deletes when purging a dead domain - Move account association definitions to concern --- lib/mastodon/domains_cli.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/mastodon/domains_cli.rb b/lib/mastodon/domains_cli.rb index a7a5caa11..16e298584 100644 --- a/lib/mastodon/domains_cli.rb +++ b/lib/mastodon/domains_cli.rb @@ -22,11 +22,7 @@ module Mastodon dry_run = options[:dry_run] ? ' (DRY RUN)' : '' Account.where(domain: domain).find_each do |account| - unless options[:dry_run] - SuspendAccountService.new.call(account) - account.destroy - end - + SuspendAccountService.new.call(account, destroy: true) unless options[:dry_run] removed += 1 say('.', :green, false) end -- cgit