summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJeong Arm <kjwonmail@gmail.com>2019-04-02 02:17:21 +0900
committerEugen Rochko <eugen@zeonfederated.com>2019-04-01 19:17:21 +0200
commit67eb47e25f1e7704dd9ecd32695ff3b53c807375 (patch)
treefd097acb2fd5dbae0cf621afd2125c7d331162d0 /lib
parent2acd8940de596ab119e35bd204fe55e06b914403 (diff)
Simplify culling and fix race condition (#10440)
Diffstat (limited to 'lib')
-rw-r--r--lib/mastodon/accounts_cli.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/mastodon/accounts_cli.rb b/lib/mastodon/accounts_cli.rb
index dca31cdca3e..f02b2149b7f 100644
--- a/lib/mastodon/accounts_cli.rb
+++ b/lib/mastodon/accounts_cli.rb
@@ -236,11 +236,7 @@ module Mastodon
end
if [404, 410].include?(code)
- unless options[:dry_run]
- SuspendAccountService.new.call(account)
- account.destroy
- end
-
+ SuspendAccountService.new.call(account, destroy: true) unless options[:dry_run]
culled += 1
say('+', :green, false)
else