Merge pull request #4963 from Ruxton/feature/rake_task_to_run_account_deletion_fixes_4792

Rake task for running outstanding account deletions
This commit is contained in:
Jonne Haß 2014-05-24 17:59:49 +02:00
commit 77133a4062
2 changed files with 21 additions and 0 deletions

View file

@ -1,5 +1,11 @@
# Head
## Ensure account deletions are run
A regression caused accounts deletions to not properly perform in some cases, see [#4792](https://github.com/diaspora/diaspora/issues/4792).
To ensure these are reexecuted properly, please run `RAILS_ENV=production bundle exec rake accounts:run_deletions`
after you've upgraded.
## Change in guid generation
This version will break federation to pods running on versions prior 0.1.1.0.

15
lib/tasks/accounts.rake Normal file
View file

@ -0,0 +1,15 @@
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."
end
puts "No acccount deletions to run."
end
end