Commit 5f3b648f authored by Rémy Coutable's avatar Rémy Coutable

Exit ElasticIndexerWorker's job happily if record cannot be found

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent f27a8757
class ElasticIndexerWorker
include Sidekiq::Worker
sidekiq_options queue: :elasticsearch
Client = Elasticsearch::Client.new(host: Gitlab.config.elasticsearch.host,
......@@ -19,6 +19,8 @@ class ElasticIndexerWorker
clear_project_indexes(record_id) if klass == Project
end
rescue Elasticsearch::Transport::Transport::Errors::NotFound
true # Less work to do!
end
def clear_project_indexes(record_id)
......
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