capistrano-ops 1.0.8 → 1.0.9

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
  SHA256:
3
- metadata.gz: cb9a8459b0906318eb8149333da576558e4f232c35ca3bd453756a1ba4031036
4
- data.tar.gz: e6e1342c6a847e029583db4824b1f69e63b687db53f42ce3f6e4e933d5d7aa27
3
+ metadata.gz: 96ec2fb775bc19f6853b6194b58f544acb57957c3ccca331caea4a7de3313507
4
+ data.tar.gz: 320ee9acc8aaa62844ea0e693b605f4b19f0567ab1449952df4941eb986096f0
5
5
  SHA512:
6
- metadata.gz: b8e3b49f6fc1fbc179713f06ec82a06b3e6bc953b256ad1f5e6b564ff47a28c9d3705e4e4b8add425de28aea1e0d5830fa055b42c9a6bc46d2244f5e645d3fb3
7
- data.tar.gz: 19516277d0a171017ad63b526f602a47056ab469defe6d6b3e5292ffe9a1a0221ed8dedd5e2012d49ea4dca5c233eb283d11fd05df6111a723a9bf13e48d5867
6
+ metadata.gz: cdb6f282869288525433017c3ccfc48638dc0abcc22b1adca479135a43d605f2308a0e3badbccdb5820e5d223be8818b41ae6ff3adade5c621a7c56b389762b9
7
+ data.tar.gz: 6e42b2e1596d763b25da9578d916ad37c0feabd2bb85ba3a7a32151bb3fb49505d641a7162ccfd1f75601da73402c541ac9bdb9ddab5e36fd6362ee19613c472
@@ -56,8 +56,6 @@ module Backup
56
56
 
57
57
  uploaded_size = 0
58
58
 
59
- # Initiate multipart upload
60
-
61
59
  # Upload the tar.gz data from the file in parts
62
60
  part_number = 1
63
61
  parts = []
@@ -66,12 +64,12 @@ module Backup
66
64
  total_wait_time = 0
67
65
 
68
66
  begin
67
+ multipart_upload ||= s3_client.create_multipart_upload(bucket: bucket, key: key)
69
68
  File.open(file_path, 'rb') do |file|
70
69
  while (part = file.read(chunk_size)) # Read calculated chunk size
71
70
  retry_count = 0
72
71
  begin
73
72
  # Initiate multipart upload
74
- multipart_upload ||= s3_client.create_multipart_upload(bucket: bucket, key: key)
75
73
  part_upload = s3_client.upload_part(
76
74
  bucket: bucket,
77
75
  key: key,
@@ -156,11 +154,11 @@ module Backup
156
154
  total_wait_time = 0
157
155
 
158
156
  begin
157
+ # Initiate multipart upload
158
+ multipart_upload ||= s3_client.create_multipart_upload(bucket: bucket, key: key)
159
159
  while (part = read_io.read(chunk_size)) # Read calculated chunk size
160
160
  retry_count = 0
161
161
  begin
162
- # Initiate multipart upload
163
- multipart_upload ||= s3_client.create_multipart_upload(bucket: bucket, key: key)
164
162
  part_upload = s3_client.upload_part(
165
163
  bucket: bucket,
166
164
  key: key,
@@ -225,8 +223,6 @@ module Backup
225
223
  end
226
224
  # rubocop:enable Metrics/MethodLength
227
225
 
228
- private
229
-
230
226
  def start_writer_thread(folder_path, write_io)
231
227
  Thread.new do
232
228
  parent_folder = File.dirname(folder_path)
@@ -32,7 +32,7 @@ module Backup
32
32
 
33
33
  def calculate_chunk_size(total_size)
34
34
  max_chunks = 10_000
35
- min_chunk_size = 20 * 1024 * 1024 # 20MB
35
+ min_chunk_size = 50 * 1024 * 1024 # 50MB
36
36
  max_chunk_size = 105 * 1024 * 1024 # 105MB
37
37
  chunk_size = [total_size / max_chunks, min_chunk_size].max
38
38
  [chunk_size, max_chunk_size].min
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Capistrano
4
4
  module Ops
5
- VERSION = '1.0.8'
5
+ VERSION = '1.0.9'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-ops
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Crusius
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-12-16 00:00:00.000000000 Z
11
+ date: 2024-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-s3