roadworker 0.5.14 → 0.5.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/roadworker/batch.rb +15 -2
- data/lib/roadworker/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 163707e7a36317de25bda9f1c0af701729fbf6cbb67bcabf51f7fed86e5f97a9
|
4
|
+
data.tar.gz: 044bbcd3a3c89be69d86be7b16f183588865770122001023ad11576409408267
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7049cb4fb2254a360eafe3f54a53d923faa1d042e7533aab9c54d61a06899d7bc55805263ae672bf01d17c880af32ebe8a5afe2c7e2fa1ec2efd653942473696
|
7
|
+
data.tar.gz: c323c0eef4acebe24f9dc04e261e4434a0c814913d678ba563aa93a47a0d0c5f741bca039767314ef023cb140abeae9e623e0c47ec5356aec0736d828849b797
|
data/lib/roadworker/batch.rb
CHANGED
@@ -85,10 +85,10 @@ module Roadworker
|
|
85
85
|
total_ops = 0
|
86
86
|
ops.slice_before do |op|
|
87
87
|
total_value_size += op.value_size
|
88
|
-
total_ops +=
|
88
|
+
total_ops += op.op_size
|
89
89
|
if total_value_size > 32000 || total_ops > 1000
|
90
90
|
total_value_size = op.value_size
|
91
|
-
total_ops =
|
91
|
+
total_ops = op.op_size
|
92
92
|
true
|
93
93
|
else
|
94
94
|
false
|
@@ -150,6 +150,8 @@ module Roadworker
|
|
150
150
|
end
|
151
151
|
|
152
152
|
# Count total length of RR "Value" included in changes
|
153
|
+
# https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html#limits-api-requests-changeresourcerecordsets
|
154
|
+
#
|
153
155
|
# See also: Batch#slice_operations
|
154
156
|
# @return [Integer]
|
155
157
|
def value_size
|
@@ -163,6 +165,17 @@ module Roadworker
|
|
163
165
|
end.sum || 0
|
164
166
|
end
|
165
167
|
|
168
|
+
# Count of operational size
|
169
|
+
# https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html#limits-api-requests-changeresourcerecordsets
|
170
|
+
#
|
171
|
+
# See also: Batch#slice_operations
|
172
|
+
# @return [Integer]
|
173
|
+
def op_size
|
174
|
+
changes.map do |change|
|
175
|
+
change[:action] == 'UPSERT' ? 2 : 1
|
176
|
+
end.sum || 0
|
177
|
+
end
|
178
|
+
|
166
179
|
# @return [Array<Hash>]
|
167
180
|
def changes
|
168
181
|
raise NotImplementedError
|
data/lib/roadworker/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roadworker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- winebarrel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-route53
|
@@ -238,7 +238,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
238
238
|
- !ruby/object:Gem::Version
|
239
239
|
version: '0'
|
240
240
|
requirements: []
|
241
|
-
rubygems_version: 3.1.
|
241
|
+
rubygems_version: 3.1.4
|
242
242
|
signing_key:
|
243
243
|
specification_version: 4
|
244
244
|
summary: Roadworker is a tool to manage Route53.
|