From 46d5767a6ab84375cf2dc75ff75e5860cb29d0e9 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 30 Mar 2016 14:45:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89elasticsearch=E5=A4=9A?= =?UTF-8?q?=E5=8F=B0=E9=83=A8=E7=BD=B2=EF=BC=8C=E5=8F=AA=E8=A6=81=E4=B8=80?= =?UTF-8?q?=E5=8F=B0=E5=8D=B3=E5=8F=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/application.rb | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/config/application.rb b/config/application.rb index 9e6d41abe..8d721f00a 100644 --- a/config/application.rb +++ b/config/application.rb @@ -73,17 +73,6 @@ module RedmineApp end config.after_initialize do - if RbConfig::CONFIG['target_os'] == 'mingw32' - Elasticsearch::Client.new hosts: ['localhost:9200'], retry_on_failure: true,log:true - elsif RbConfig::CONFIG['target_os'] == 'linux' && ["fast76"].include?(`hostname`.gsub("\n","")) - Elasticsearch::Client.new hosts: ['localhost:9200'], retry_on_failure: true,log:true - elsif RbConfig::CONFIG['target_os'] == 'linux' && ["testtrustie11","agent12"].include?(`hostname`.gsub("\n","")) - Elasticsearch::Client.new hosts: ['localhost:9200','192.168.80.11:9200','192.168.80.12:9200'], retry_on_failure: true - elsif RbConfig::CONFIG['target_os'] == 'linux' && ["trustie168","trustieserver14","trustieserver16","Trustie18"].include?(`hostname`.gsub("\n","")) - Elasticsearch::Client.new hosts: ['localhost:9200','192.168.80.168:9200'], retry_on_failure: true - else - Elasticsearch::Client.new hosts: ['localhost:9200'], retry_on_failure: true - end end if File.exists?(File.join(File.dirname(__FILE__), 'additional_environment.rb'))