Merge branch 'sh-revert-full-gc-after-import' into 'master'

Don't run full gc in AfterImportService

Closes gitlab-ee#11556

See merge request gitlab-org/gitlab-ce!28239
This commit is contained in:
Rémy Coutable 2019-05-10 13:33:04 +00:00
commit 4c16ce1184
2 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@ module Projects
end
def execute
Projects::HousekeepingService.new(@project, :gc).execute do
Projects::HousekeepingService.new(@project).execute do
repository.delete_all_refs_except(RESERVED_REF_PREFIXES)
end
rescue Projects::HousekeepingService::LeaseTaken => e

View File

@ -15,7 +15,7 @@ describe Projects::AfterImportService do
describe '#execute' do
before do
allow(Projects::HousekeepingService)
.to receive(:new).with(project, :gc).and_return(housekeeping_service)
.to receive(:new).with(project).and_return(housekeeping_service)
allow(housekeeping_service)
.to receive(:execute).and_yield