Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2018-11-21 22:46:50 +0300
committerToon Claes <toon@gitlab.com>2018-11-28 00:48:55 +0300
commit4908e4b3a213fbdea0a45b3cc30774981529b483 (patch)
tree7c359dd0e405787b81ee5325d2cfd8ea5767fe36 /lib/gitlab/background_migration
parent220208c051ef8a23c801662beeee6b60d00b4b18 (diff)
Run repository cleanup on failure
Diffstat (limited to 'lib/gitlab/background_migration')
-rw-r--r--lib/gitlab/background_migration/backfill_project_fullpath_in_repo_config.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/gitlab/background_migration/backfill_project_fullpath_in_repo_config.rb b/lib/gitlab/background_migration/backfill_project_fullpath_in_repo_config.rb
index a3b5324cc1d..36eff3078aa 100644
--- a/lib/gitlab/background_migration/backfill_project_fullpath_in_repo_config.rb
+++ b/lib/gitlab/background_migration/backfill_project_fullpath_in_repo_config.rb
@@ -106,6 +106,10 @@ module Gitlab
repository_service.delete_config([FULLPATH_CONFIG_KEY])
end
+ def cleanup_repository
+ repository_service.cleanup
+ end
+
def storage
@storage ||=
if hashed_storage?
@@ -138,7 +142,10 @@ module Gitlab
def perform(project_id, retry_count)
project = Project.find(project_id)
- migration_class.new.safe_perform_one(project, retry_count) if project
+ return unless project
+
+ project.cleanup_repository
+ migration_class.new.safe_perform_one(project, retry_count)
end
end