去掉elasticsearch多台部署,只要一台即可

This commit is contained in:
guange 2016-03-30 14:45:33 +08:00
parent 28bf5b67b5
commit 46d5767a6a
1 changed files with 0 additions and 11 deletions

View File

@ -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'))