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

9 lines
340 B
Ruby

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
Elasticsearch::Model.client = client
Elasticsearch::Persistence.client = client