Skip to content

Commit

Permalink
fix index_document error message. #690
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Dec 24, 2020
1 parent fdef14b commit c5ddd08
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/jobs/index_background_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion app/jobs/index_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit c5ddd08

Please sign in to comment.