diff --git a/Changelog.md b/Changelog.md index 23a749743..6efe13f51 100644 --- a/Changelog.md +++ b/Changelog.md @@ -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. diff --git a/lib/tasks/accounts.rake b/lib/tasks/accounts.rake new file mode 100644 index 000000000..1fcfbb553 --- /dev/null +++ b/lib/tasks/accounts.rake @@ -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