diff --git a/app/jobs/index_background_job.rb b/app/jobs/index_background_job.rb index 545248b30..94e218e27 100644 --- a/app/jobs/index_background_job.rb +++ b/app/jobs/index_background_job.rb @@ -11,6 +11,6 @@ class IndexBackgroundJob < ApplicationJob def perform(obj) response = obj.__elasticsearch__.index_document # Rails.logger.error "[Elasticsearch] Error indexing id #{response["_id"]} in index #{response["_index"]}" if response["result"] != "created" - Rails.logger.error "[Elasticsearch] Error #{response.inspect}" if response["result"] != "created" + Rails.logger.error "[Elasticsearch] Error #{response.inspect}" unless %w(created updated).include?(response["result"]) end end diff --git a/app/jobs/index_job.rb b/app/jobs/index_job.rb index 483a33b12..04d43bcd1 100644 --- a/app/jobs/index_job.rb +++ b/app/jobs/index_job.rb @@ -11,6 +11,6 @@ class IndexJob < ApplicationJob def perform(obj) response = obj.__elasticsearch__.index_document # Rails.logger.error "[Elasticsearch] Error indexing id #{response["_id"]} in index #{response["_index"]}" if response["result"] != "created" - Rails.logger.error "[Elasticsearch] Error #{response.inspect}" if response["result"] != "created" + Rails.logger.error "[Elasticsearch] Error #{response.inspect}" unless %w(created updated).include?(response["result"]) end end