Use worker to destroy namespaceless projects in post-deploy
Destroying projects can be very time consuming. So instead of destroying them in the post-deploy, just schedule them and make Sidekiq do the hard work. They are scheduled in batches of 5000 records. This way the number of database requests is limited while also the amount data read to memory is limited.
Showing with 202 additions and 72 deletions
db/post_migrate/20170502101023_clean_up_pending_delete_projects.rb → app/workers/namespaceless_project_destroy_worker.rb