elasticsearch_s3_backup 1.1.8 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dde7a2602985a4053ca5b06943bc0187710b7a1c
4
- data.tar.gz: 3553da1fbf17e5c23ba00ec7173642036906f70b
3
+ metadata.gz: bd339d3f1f0ba20c3f4cd7fe8449b6abeda2c567
4
+ data.tar.gz: 137eb6de22067e90a6c16467150a41f4c81e7a9a
5
5
  SHA512:
6
- metadata.gz: 8415ae26f6693da6092372d833027dbec2ae23623ad3d26a5a017134fa38a72aa88bce3715d1d6001ae6cb1a36e94590ad894d836fb4789938b7627cfacf4628
7
- data.tar.gz: 381b7db44f538401eca6ffadac0edfe613d7fe9edf969179be3de2c90c4dd322a7b4c6237bdc48928525d8942f2c6cd3e86956f57931284bccbb8cd37a01db73
6
+ metadata.gz: 07d68a5fc71d49dc27fe888c7d7a0f5a20c5e30390a9c973f0dbd1b2a8234d0104bd873cc31c7d366fb469f050fc75930b2479ab566aa7d96be8d5369d63abef
7
+ data.tar.gz: bbec0b79107ce17a9cd4297eb60bc0928e1418c8b48910c90a63a66d17e29dc2d7b0f4244740cf760318d1caf167a87ae44dc3f676527a346291291cc8888851
@@ -1,5 +1,5 @@
1
1
  module EverTools
2
2
  class ElasticsearchS3Backup
3
- VERSION = '1.1.8'
3
+ VERSION = '1.2.0'
4
4
  end
5
5
  end
@@ -180,6 +180,15 @@ module EverTools
180
180
  retry if tries >= 0
181
181
  end
182
182
 
183
+ def cleanup_test_indexes
184
+ logger.info "Removing remnant test indexes..."
185
+ # Gather backup test indices
186
+ es_api.indices.get(index: 'backup_test_*').each do |test_index, value|
187
+ # Check again that they are backup test indices
188
+ es_api.indices.delete index: test_index if test_index =~ /backup_test_(.*)/
189
+ end
190
+ end
191
+
183
192
  # rubocop:disable Metrics/AbcSize, Lint/RescueException
184
193
  def run
185
194
  unless master?
@@ -187,6 +196,7 @@ module EverTools
187
196
  exit
188
197
  end
189
198
 
199
+ cleanup_test_indexes
190
200
  insert_test_data
191
201
 
192
202
  # Create a new repo if none exists (typically at beginning of month)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elasticsearch_s3_backup
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.8
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Herot
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-09-17 00:00:00.000000000 Z
11
+ date: 2016-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -178,9 +178,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
178
178
  version: '0'
179
179
  requirements: []
180
180
  rubyforge_project:
181
- rubygems_version: 2.4.5
181
+ rubygems_version: 2.5.1
182
182
  signing_key:
183
183
  specification_version: 4
184
184
  summary: Backs up ElasticSearch to S3
185
185
  test_files: []
186
- has_rdoc: