Commit 4c16ce11 authored by Rémy Coutable's avatar Rémy Coutable

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
parents b575b303 36b1a2d7
...@@ -9,7 +9,7 @@ module Projects ...@@ -9,7 +9,7 @@ module Projects
end end
def execute def execute
Projects::HousekeepingService.new(@project, :gc).execute do Projects::HousekeepingService.new(@project).execute do
repository.delete_all_refs_except(RESERVED_REF_PREFIXES) repository.delete_all_refs_except(RESERVED_REF_PREFIXES)
end end
rescue Projects::HousekeepingService::LeaseTaken => e rescue Projects::HousekeepingService::LeaseTaken => e
......
...@@ -15,7 +15,7 @@ describe Projects::AfterImportService do ...@@ -15,7 +15,7 @@ describe Projects::AfterImportService do
describe '#execute' do describe '#execute' do
before do before do
allow(Projects::HousekeepingService) 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) allow(housekeeping_service)
.to receive(:execute).and_yield .to receive(:execute).and_yield
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment