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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cb50948a3bda279ddb2a7c313d81aa2cd34ca27f
4
- data.tar.gz: c531e2cfb7d94ae65715c851546aec12b8f363c5
3
+ metadata.gz: dc0fd72a92d1558e5220e4c9e29890fc7a42a5ef
4
+ data.tar.gz: 6728b0a29e270e15d12cf471930663e6bb4e8bc9
5
5
  SHA512:
6
- metadata.gz: 4937590b726d5c3a35359516ecd0f6fbaf1428e42386584446a8069b0483cd266eb0c79d925f70a0e4705d32ad25fdfb96fbdd53ab787815b187953f432d8b69
7
- data.tar.gz: 8d3afe750e32aa36ed73934b650b48395a3d2dec5e83b0df1c8298dd54153d7a02f0e91ca9ee8340eaaf3bfc84b7bf13177a4493e196eb40d64c597dff052a48
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 URI "http://#{auth}@#{es_host}:9200"
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']]['node'] == node_name
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 0
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
@@ -1,5 +1,5 @@
1
1
  module EverTools
2
2
  class ElasticsearchS3Backup
3
- VERSION = '1.1.1'
3
+ VERSION = '1.1.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elasticsearch_s3_backup
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Herot