diaspora/lib/tasks/accounts.rake
Jonne Haß fc1f249129 Harden account deletion
* Wrap it into a transaction
* Use destroy over delete so dependent destroys get triggered
  and we thus don't fail on the foreign key constraits
* Check if a photos status message actually exists before accessing
  it
* Add missing dependent destroys
2014-05-27 00:15:15 +02:00

15 lines
347 B
Ruby

namespace :accounts do
desc "Run deletions"
task :run_deletions => :environment do
if ::AccountDeletion.count > 0
puts "Running account deletions.."
::AccountDeletion.find_each do |account_delete|
account_delete.perform!
end
puts "OK."
else
puts "No acccount deletions to run."
end
end
end