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 +4 -4
- data/lib/s3_meta_sync/syncer.rb +9 -5
- data/lib/s3_meta_sync/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 216269b8e8057ed05a79cfdc52324704203c57e5
|
4
|
+
data.tar.gz: 924fd0b552fbe6734acb3c89e5cb3193bff08f1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ea2a75355336b6c88d303ed183d5681819c4d560f3edcde9bdfc1aca872ec690b9032abcd97e8d7c8aba36bd76bf7d2e0924903450512eb61b7642582b23134
|
7
|
+
data.tar.gz: 0c59e4cfb6a6630f932385e573209f644b39498336ab9fe379a104a579834518eaada8cba94dcccb4e77f910ebc719b3d1bc1779e18b1bd964ef6f64ec83d60f
|
data/lib/s3_meta_sync/syncer.rb
CHANGED
@@ -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
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
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
|
|
data/lib/s3_meta_sync/version.rb
CHANGED
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.
|
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-
|
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.
|
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
|