Commit ef4bd293 authored by Valery Sizov's avatar Valery Sizov

ES: fixes after review

parent 7dbcd777
......@@ -14,9 +14,7 @@ class PostReceive
repo_path.gsub!(/\.git\z/, "")
repo_path.gsub!(/\A\//, "")
if repo_path =~ /wiki\z/ && Gitlab.config.elasticsearch.enabled
update_wiki_es_indexes(repo_path)
end
project = Project.find_with_namespace(repo_path)
......@@ -65,6 +63,8 @@ class PostReceive
end
def update_wiki_es_indexes(repo_path)
return unless repo_path =~ /wiki\z/ && Gitlab.config.elasticsearch.enabled
project = Project.find_with_namespace(repo_path.gsub(/\.wiki\z/, ""))
if project
......
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