Remove BATCH_SIZE from WikiFileFinder
This commit is contained in:
parent
b9f0eff9fc
commit
b731feba06
2 changed files with 6 additions and 3 deletions
5
changelogs/unreleased/57223-wiki-finder.yml
Normal file
5
changelogs/unreleased/57223-wiki-finder.yml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: Remove BATCH_SIZE from WikiFileFinder
|
||||||
|
merge_request: 24933
|
||||||
|
author:
|
||||||
|
type: other
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue