|
|
|
@ -75,10 +75,14 @@ module RedmineApp
|
|
|
|
|
config.after_initialize do
|
|
|
|
|
if RbConfig::CONFIG['target_os'] == 'mswin32'
|
|
|
|
|
Elasticsearch::Client.new hosts: ['localhost:9200'], retry_on_failure: true
|
|
|
|
|
elsif RbConfig::CONFIG['target_os'] == 'linux' && ["testtrustie11","agent12"].include?(`hostname`)
|
|
|
|
|
elsif RbConfig::CONFIG['target_os'] == 'linux' && ["fast76"].include?(`hostname`.gsub("\n",""))
|
|
|
|
|
Elasticsearch::Client.new hosts: ['localhost:9200'], retry_on_failure: 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`)
|
|
|
|
|
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','192.168.80.14:9200','192.168.80.16:9200','192.168.80.18:9200'], retry_on_failure: true
|
|
|
|
|
else
|
|
|
|
|
Elasticsearch::Client.new hosts: ['localhost:9200'], retry_on_failure: true
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|