Commit dc112f09 authored by Valery Sizov's avatar Valery Sizov

ES: fix after review

parent 1d209416
......@@ -15,15 +15,7 @@ class PostReceive
repo_path.gsub!(/\A\//, "")
if repo_path =~ /wiki\z/ && Gitlab.config.elasticsearch.enabled
repo_path.gsub!(/\.wiki\z/, "")
project = Project.find_with_namespace(repo_path)
if project
project.wiki.index_blobs
end
return false
update_wiki_es_indexes(repo_path)
end
project = Project.find_with_namespace(repo_path)
......@@ -71,4 +63,12 @@ class PostReceive
def log(message)
Gitlab::GitLogger.error("POST-RECEIVE: #{message}")
end
def update_wiki_es_indexes(repo_path)
project = Project.find_with_namespace(repo_path.gsub(/\.wiki\z/, ""))
if project
project.wiki.index_blobs
end
end
end
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