elastic_manager 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/elastic_manager.gemspec +1 -1
- data/lib/elastic_manager/config.rb +1 -1
- data/lib/elastic_manager.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bca9616ef02571e4e12f488fb61367e5009788fa919d26dd862b3f5b11fa014f
|
4
|
+
data.tar.gz: 790823ce0244db16bf668e664a37bce2d644eda86f17283a1ae883242473aa78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a25ec8e9155eaa37d6661828853c3708c1eb7bdf81b2f7fcd281eedc337d013e8bcf3d56cc245ce69f0208c7c9d921226260ef7472a765f07024591832a45ba
|
7
|
+
data.tar.gz: ffe738eae1d02696ec2516331f781326381495ab9d42ee30b83bb9e14d6670285d417e142f529f6b289eb819d62955062761670915cec9893a0d2897da49adbe
|
data/elastic_manager.gemspec
CHANGED
@@ -21,7 +21,7 @@ module Config
|
|
21
21
|
def make_default_config
|
22
22
|
default = Hash.new { |hash, key| hash[key] = Hash.new(&hash.default_proc) }
|
23
23
|
|
24
|
-
default['
|
24
|
+
default['es']['url'] = 'http://127.0.0.1:9200'
|
25
25
|
default['retry'] = '10'
|
26
26
|
default['sleep'] = '60'
|
27
27
|
default['force'] = 'false'
|
data/lib/elastic_manager.rb
CHANGED
@@ -26,7 +26,7 @@ class ElasticManager
|
|
26
26
|
def es_request(verb, uri, json = {})
|
27
27
|
tries ||= @config['retry'].to_i
|
28
28
|
|
29
|
-
request_uri = "#{@config['
|
29
|
+
request_uri = "#{@config['es']['url']}#{uri}"
|
30
30
|
|
31
31
|
response = HTTP.timeout(
|
32
32
|
write: @config['timeout']['write'].to_i,
|
@@ -108,7 +108,7 @@ class ElasticManager
|
|
108
108
|
|
109
109
|
unless true?(@config['force'])
|
110
110
|
unless es_green?
|
111
|
-
log.fatal "elasticsearch on #{@config['
|
111
|
+
log.fatal "elasticsearch on #{@config['es']['url']} is not green"
|
112
112
|
exit 1
|
113
113
|
end
|
114
114
|
end
|