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
Sylvain 4300f29ad7 [bug] unable to run rake fablab🇪🇸* tasks due to an issue with gem faraday 0.16.x
Gem faraday was updated to 0.17 to solve the issue
2019-10-16 13:11:47 +02:00

11 lines
398 B
Ruby

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