-
- Downloads
Handle errors while a project is being deleted asynchronously.
1. Rescue all errors that `Projects::DestroyService` might throw, to prevent the worker from leaving things in an inconsistent state 2. Unmark the project as `pending_delete` 3. Add a `delete_error` text column to `projects`, and save the error message in there, to be shown to the project masters/owners.
Showing
- app/services/projects/destroy_service.rb 5 additions, 4 deletionsapp/services/projects/destroy_service.rb
- app/workers/project_destroy_worker.rb 3 additions, 0 deletionsapp/workers/project_destroy_worker.rb
- db/migrate/20170428064307_add_column_delete_error_to_projects.rb 31 additions, 0 deletions...ate/20170428064307_add_column_delete_error_to_projects.rb
- db/schema.rb 1 addition, 0 deletionsdb/schema.rb
- spec/lib/gitlab/import_export/safe_model_attributes.yml 1 addition, 0 deletionsspec/lib/gitlab/import_export/safe_model_attributes.yml
- spec/services/projects/destroy_service_spec.rb 63 additions, 0 deletionsspec/services/projects/destroy_service_spec.rb
Please register or sign in to comment