Don't run full gc in AfterImportService
Pull mirrors would run the `Projects::AfterImportService`, which would force a `git gc` each time it finished. This is overkill and not necessary now that we have refs packed more frequently (https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/27826). Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/11556
This commit is contained in:
parent
b575b30343
commit
36b1a2d7d0
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue