diff options
Diffstat (limited to 'app/services/concerns/update_repository_storage_methods.rb')
-rw-r--r-- | app/services/concerns/update_repository_storage_methods.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/services/concerns/update_repository_storage_methods.rb b/app/services/concerns/update_repository_storage_methods.rb index a0b4040cff7..bb43cab79bb 100644 --- a/app/services/concerns/update_repository_storage_methods.rb +++ b/app/services/concerns/update_repository_storage_methods.rb @@ -14,12 +14,16 @@ module UpdateRepositoryStorageMethods end def execute - repository_storage_move.with_lock do - return ServiceResponse.success unless repository_storage_move.scheduled? # rubocop:disable Cop/AvoidReturnFromBlocks + response = repository_storage_move.with_lock do + next ServiceResponse.success unless repository_storage_move.scheduled? repository_storage_move.start! + + nil end + return response if response + mirror_repositories unless same_filesystem? repository_storage_move.transaction do |