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

9 lines
340 B
Ruby
Raw Normal View History

if Rails.env.test?
client = Elasticsearch::Client.new host: "http://#{Rails.application.secrets.elaticsearch_host}:9200", log: false
else
client = 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