elasticsearch_s3_backup 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/elasticsearch_s3_backup.rb +11 -3
- data/lib/elasticsearch_s3_backup/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc0fd72a92d1558e5220e4c9e29890fc7a42a5ef
|
4
|
+
data.tar.gz: 6728b0a29e270e15d12cf471930663e6bb4e8bc9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8383b52217f7b1e8ce01b6bee2a4360a548c4f73436922aa525ec2ba77bf462ace38c29589f4547c589bfd0f0f6315742d9640e8c49773a575b3161aaba694fd
|
7
|
+
data.tar.gz: 8f5f0cf9324f4615310c892f66418ef4ae8d786c74d04388a14e7e7150e26b6a375682dab3b3dfe8bb9f7b565ae7ca691a2d5a4f4a3de33eb4b86ec6e1220e16
|
@@ -61,12 +61,12 @@ module EverTools
|
|
61
61
|
def es_api
|
62
62
|
@es_api ||= begin
|
63
63
|
es_host = @conf['es_host'] || 'localhost'
|
64
|
-
Elasticsearch::Client.new
|
64
|
+
Elasticsearch::Client.new host: "http://#{auth}@#{es_host}:9200"
|
65
65
|
end
|
66
66
|
end
|
67
67
|
|
68
68
|
def master?
|
69
|
-
es_api.nodes.info['nodes'][es_api.cluster.state['master_node']]['
|
69
|
+
es_api.nodes.info['nodes'][es_api.cluster.state['master_node']]['name'] == node_name
|
70
70
|
end
|
71
71
|
|
72
72
|
def pseudo_random_string
|
@@ -167,7 +167,7 @@ module EverTools
|
|
167
167
|
def run
|
168
168
|
unless master?
|
169
169
|
logger.info 'This node is not the currently elected master. Exiting.'
|
170
|
-
exit
|
170
|
+
exit
|
171
171
|
end
|
172
172
|
|
173
173
|
insert_test_data
|
@@ -184,6 +184,14 @@ module EverTools
|
|
184
184
|
|
185
185
|
remove_expired_backups
|
186
186
|
logger.info 'Finished'
|
187
|
+
rescue Interrupt
|
188
|
+
puts "Received #{e.class}"
|
189
|
+
exit 99
|
190
|
+
rescue SignalException => e
|
191
|
+
logger.info "Received: #{e.signm} (#{e.signo})"
|
192
|
+
exit 2
|
193
|
+
rescue SystemExit => e
|
194
|
+
exit e.status
|
187
195
|
rescue Exception => e # Need to rescue "Exception" so that Sentry gets it
|
188
196
|
notify e
|
189
197
|
logger.fatal e.message
|