volcano-sdk 0.10.3 → 0.10.4
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 +4 -4
- data/lib/volcano/durable_models.rb +2 -4
- data/lib/volcano/functions.rb +1 -1
- data/lib/volcano/generated_transport_durable.rb +1 -1
- data/lib/volcano/lock_auto_renewal.rb +3 -5
- data/lib/volcano/realtime/protocol_io.rb +1 -1
- data/lib/volcano/realtime/protocol_publication_dispatch.rb +1 -3
- data/lib/volcano/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f075438ba4003381bb9545b1703c73bd73d13b563156bb53039da2f350fb8d03
|
|
4
|
+
data.tar.gz: bd58bb6dd1ffa28c1dba5451c9bfa786c27805ee242917b19a14fc5767ab282d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0c8db1372246e30839c93bf406126799693969ef80e4f0c9c8e0b1d1956f01b5b1a7265d7261b695a5207b9dc1f3c3106b4da695a9ac123c01749b7509a7b00b
|
|
7
|
+
data.tar.gz: 49143abcf1a3bf14933adb7aa00feee341a22ca75047ca1f03966c368d20dc6c313f802c4898fd7d33b390b221a5cff1567f1ff1dbeef82e57741dba46872f7e
|
|
@@ -117,19 +117,17 @@ module Volcano
|
|
|
117
117
|
)
|
|
118
118
|
end
|
|
119
119
|
|
|
120
|
-
# An empty page carries no executions at all rather than an empty array.
|
|
121
120
|
def page_payload(payload)
|
|
122
121
|
raise TypeError, INCOMPLETE_PAGE unless payload.is_a?(Hash)
|
|
123
122
|
|
|
124
|
-
data = payload['data']
|
|
125
|
-
has_more = payload
|
|
123
|
+
data = payload['data']
|
|
124
|
+
has_more = payload['has_more']
|
|
126
125
|
raise TypeError, INCOMPLETE_PAGE unless data.is_a?(Array) && [true, false].include?(has_more)
|
|
127
126
|
|
|
128
127
|
[data, has_more]
|
|
129
128
|
end
|
|
130
129
|
|
|
131
130
|
def count(value)
|
|
132
|
-
return 0 if value.nil?
|
|
133
131
|
raise TypeError, INCOMPLETE_PAGE unless value.is_a?(Integer)
|
|
134
132
|
|
|
135
133
|
value
|
data/lib/volcano/functions.rb
CHANGED
|
@@ -120,7 +120,7 @@ module Volcano
|
|
|
120
120
|
end
|
|
121
121
|
|
|
122
122
|
def cache_ttl(payload)
|
|
123
|
-
ttl = payload['cache_ttl_seconds']
|
|
123
|
+
ttl = payload['cache_ttl_seconds']
|
|
124
124
|
raise TypeError, 'Expected a complete function response' unless ttl.is_a?(Integer) && ttl.positive?
|
|
125
125
|
|
|
126
126
|
ttl
|
|
@@ -31,7 +31,7 @@ module Volcano
|
|
|
31
31
|
invoke do
|
|
32
32
|
apis = @api_factory.call(authorization)
|
|
33
33
|
data, status, headers = apis.durable.list_durable_executions_with_http_info(
|
|
34
|
-
project_id, function_id, options
|
|
34
|
+
project_id, function_id, options.merge(debug_return_type: 'Object')
|
|
35
35
|
)
|
|
36
36
|
response(data, status, headers)
|
|
37
37
|
end
|
|
@@ -30,17 +30,15 @@ module Volcano
|
|
|
30
30
|
LockRenewer.new(self, key, guard, config)
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
-
def renewal_delay(ttl, remaining:
|
|
33
|
+
def renewal_delay(ttl, remaining:)
|
|
34
34
|
delay = [ttl / 3.0, MAX_RENEWAL_DELAY_SECONDS].min
|
|
35
35
|
latest = latest_renewal_delay(remaining)
|
|
36
|
-
delay = [delay, latest].min
|
|
36
|
+
delay = [delay, latest].min
|
|
37
37
|
jittered = [0.0, delay * (0.9 + (rand * 0.2))].max
|
|
38
|
-
|
|
38
|
+
[jittered, latest].min
|
|
39
39
|
end
|
|
40
40
|
|
|
41
41
|
def latest_renewal_delay(remaining)
|
|
42
|
-
return unless remaining
|
|
43
|
-
|
|
44
42
|
[0.0, remaining - RENEWAL_SAFETY_MARGIN_SECONDS - RENEWAL_REQUEST_BUDGET_SECONDS].max
|
|
45
43
|
end
|
|
46
44
|
|
|
@@ -43,8 +43,6 @@ module Volcano
|
|
|
43
43
|
end
|
|
44
44
|
|
|
45
45
|
def reject_invalid_publication(channel, publication)
|
|
46
|
-
return unless channel
|
|
47
|
-
|
|
48
46
|
if publication.is_a?(Hash)
|
|
49
47
|
drop_publication(channel, publication)
|
|
50
48
|
else
|
|
@@ -54,7 +52,7 @@ module Volcano
|
|
|
54
52
|
end
|
|
55
53
|
|
|
56
54
|
def drop_handlerless_publication(channel, publication)
|
|
57
|
-
drop_publication(channel, publication)
|
|
55
|
+
drop_publication(channel, publication)
|
|
58
56
|
nil
|
|
59
57
|
end
|
|
60
58
|
|
data/lib/volcano/version.rb
CHANGED