Remove BATCH_SIZE from WikiFileFinder

This commit is contained in:
Jarka Košanová 2019-02-04 10:34:02 +01:00
parent b9f0eff9fc
commit b731feba06
2 changed files with 6 additions and 3 deletions

View file

@ -0,0 +1,5 @@
---
title: Remove BATCH_SIZE from WikiFileFinder
merge_request: 24933
author:
type: other

View file

@ -2,8 +2,6 @@
module Gitlab module Gitlab
class WikiFileFinder < FileFinder class WikiFileFinder < FileFinder
BATCH_SIZE = 100
attr_reader :repository attr_reader :repository
def initialize(project, ref) def initialize(project, ref)
@ -19,7 +17,7 @@ module Gitlab
safe_query = Regexp.new(safe_query, Regexp::IGNORECASE) safe_query = Regexp.new(safe_query, Regexp::IGNORECASE)
filenames = repository.ls_files(ref) filenames = repository.ls_files(ref)
filenames.grep(safe_query).first(BATCH_SIZE) filenames.grep(safe_query)
end end
end end
end end