s3_meta_sync 0.13.0 → 0.13.1

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: 5a615961aa602927cb18e0e70d56be412f6dee9e
4
- data.tar.gz: 745648bd849c20d6ad82f2617fe5363d1f5218a9
3
+ metadata.gz: 216269b8e8057ed05a79cfdc52324704203c57e5
4
+ data.tar.gz: 924fd0b552fbe6734acb3c89e5cb3193bff08f1d
5
5
  SHA512:
6
- metadata.gz: 523b3f6b26a1d690be90cb2af4762560a8ddee28da87bf222d82089b789f9ea824bc06ec574fd42a013f8f4732eafeb60e58d3b30061719e91d2472c3c104f25
7
- data.tar.gz: 351f466424af9a242b9f29b323bbcba66d6347581a1da412bb0a53da4f33c89d1cecaecd58a08ff8678ceed8264afc9ef957874a8d26de492e022496b07494de
6
+ metadata.gz: 8ea2a75355336b6c88d303ed183d5681819c4d560f3edcde9bdfc1aca872ec690b9032abcd97e8d7c8aba36bd76bf7d2e0924903450512eb61b7642582b23134
7
+ data.tar.gz: 0c59e4cfb6a6630f932385e573209f644b39498336ab9fe379a104a579834518eaada8cba94dcccb4e77f910ebc719b3d1bc1779e18b1bd964ef6f64ec83d60f
@@ -175,11 +175,15 @@ module S3MetaSync
175
175
  def delete_remote_files(remote, paths)
176
176
  paths.each { |path| log "Deleting #{@bucket}:#{remote}/#{path}" }
177
177
  if paths.any?
178
- s3.delete_objects(
179
- delete: { objects: paths.map { |path| {key: "#{remote}/#{path}"} } },
180
- request_payer: "requester",
181
- bucket: @bucket
182
- )
178
+ # keys are limited to 1000 per request: http://docs.aws.amazon.com/sdkforruby/api/Aws/S3/Bucket.html#delete_objects-instance_method
179
+ paths.each_slice(1000) do |sliced_paths|
180
+ log "Sending request for #{sliced_paths.size} keys"
181
+ s3.delete_objects(
182
+ delete: { objects: sliced_paths.map { |path| {key: "#{remote}/#{path}"} } },
183
+ request_payer: "requester",
184
+ bucket: @bucket
185
+ )
186
+ end
183
187
  end
184
188
  end
185
189
 
@@ -1,3 +1,3 @@
1
1
  module S3MetaSync
2
- VERSION = "0.13.0"
2
+ VERSION = "0.13.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: s3_meta_sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-05 00:00:00.000000000 Z
11
+ date: 2017-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core
@@ -56,7 +56,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
56
56
  version: '0'
57
57
  requirements: []
58
58
  rubyforge_project:
59
- rubygems_version: 2.6.11
59
+ rubygems_version: 2.4.5.1
60
60
  signing_key:
61
61
  specification_version: 4
62
62
  summary: Sync folders with s3 using a metadata file and md5 diffs