Add some progress indicators to the account deletions rake task

[ci skip]

closes #7646
parent 9673f45f
......@@ -63,11 +63,22 @@ namespace :migrations do
desc "Run uncompleted account deletions"
task run_account_deletions: :environment do
if AccountDeletion.uncompleted.count > 0
puts "Running account deletions.."
AccountDeletion.uncompleted.find_each(&:perform!)
puts "Running account deletions..."
AccountDeletion.uncompleted.find_each do |account_deletion|
print "Deleting #{account_deletion.person.diaspora_handle} ..."
progress = Thread.new {
loop {
sleep 10
print "."
}
}
account_deletion.perform!
progress.kill
puts " Done"
end
puts "OK."
else
puts "No acccount deletions to run."
puts "No account deletions to run."
end
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment