Commit 80a3d835 authored by Valery Sizov's avatar Valery Sizov

ES: Make elastic indexer more stable

parent 69980498
......@@ -7,6 +7,7 @@ v 8.5.0 (unreleased)
v 8.4.4
- Re-introduce "Send email to users" link in Admin area
- Fix category values for Jenkins and JenkinsDeprecated services
- Make elastic indexer more stable
v 8.4.3
- Elasticsearch: fix partial blob indexing on push
......
......@@ -11,14 +11,15 @@ namespace :gitlab do
puts "Indexing #{project.name_with_namespace} (ID=#{project.id})..."
index_status = IndexStatus.find_or_create_by(project: project)
head_sha = project.repository.commit.sha
if index_status.last_commit == head_sha
puts "Skipped".yellow
next
end
begin
head_sha = project.repository.commit.sha
if index_status.last_commit == head_sha
puts "Skipped".yellow
next
end
project.repository.index_commits(from_rev: project.index_status.last_commit)
project.repository.index_blobs(from_rev: project.index_status.last_commit)
......
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