1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-10 21:24:20 +01:00
fab-manager/config/initializers/elasticsearch.rb

11 lines
398 B
Ruby
Raw Normal View History

# frozen_string_literal: true
client = if Rails.env.test?
Elasticsearch::Client.new host: "http://#{Rails.application.secrets.elaticsearch_host}:9200", log: false
else
Elasticsearch::Client.new host: "http://#{Rails.application.secrets.elaticsearch_host}:9200", log: true
end
2016-03-23 18:39:41 +01:00
Elasticsearch::Model.client = client
Elasticsearch::Persistence.client = client