volcano-sdk 0.32.2 → 0.32.3
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.rb +3 -1
- data/lib/volcano/durable_models.rb +2 -7
- 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: 9d3d0ea5cca245b91aacf3a1df887df87aa5ca81419e1410019f9536fcb640aa
|
|
4
|
+
data.tar.gz: 7173bed2407482a5122d11439e2c557764c1ed10463012490c38448e480bfbb8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7fe8b416c01cf5be74751679b0487e9f5c6031ff35caa039b936b63eb49fdf87ece8f3e65e7afbd28f4acf3ccbddf3892f492d2796aec82f59c840ba82f4c7fe
|
|
7
|
+
data.tar.gz: 76844522cca4fbfefb369d9d597079d5b6ae28d385a297f77b43c012c6101b3fbc42bd96f9dee82da7a9f66b318e9446b17524e4803f9f9e83ed9cac4d9a1e64
|
data/lib/volcano/durable.rb
CHANGED
|
@@ -29,10 +29,11 @@ module Volcano
|
|
|
29
29
|
# DNS-safe name pattern an invoke checks would reject half the input.
|
|
30
30
|
function_id = identifier(function_name, 'function_name')
|
|
31
31
|
name = execution_name.nil? ? nil : execution_name_argument(execution_name)
|
|
32
|
+
request_payload = ImmutableRequestValue.capture(payload)
|
|
32
33
|
response = Transport.invoke do
|
|
33
34
|
@transport.start_durable_execution_from_application(
|
|
34
35
|
authorization: @client.function_token,
|
|
35
|
-
function_id: function_id, payload:
|
|
36
|
+
function_id: function_id, payload: request_payload, execution_name: name
|
|
36
37
|
)
|
|
37
38
|
end
|
|
38
39
|
durable_execution(Transport.body(response, 202))
|
|
@@ -62,6 +63,7 @@ module Volcano
|
|
|
62
63
|
project = identifier(project_id, 'project_id')
|
|
63
64
|
function_id = identifier(function_name, 'function_name')
|
|
64
65
|
validate_paging(page, limit)
|
|
66
|
+
status = status&.dup&.freeze
|
|
65
67
|
response = Transport.invoke do
|
|
66
68
|
@transport.list_durable_executions(
|
|
67
69
|
authorization: @client.session_token, project_id: project, function_id: function_id,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require 'time'
|
|
4
|
+
require_relative 'immutable_request_value'
|
|
4
5
|
|
|
5
6
|
module Volcano
|
|
6
7
|
DURABLE_EXECUTION_ATTRIBUTES = %i[
|
|
@@ -65,16 +66,10 @@ module Volcano
|
|
|
65
66
|
# `result` is the function's own JSON, so it is frozen all the way down.
|
|
66
67
|
def immutable_value(value)
|
|
67
68
|
case value
|
|
68
|
-
when Hash then
|
|
69
|
-
when Array then value.map { |item| immutable_value(item) }.freeze
|
|
70
|
-
when Time, String then value.dup.freeze
|
|
69
|
+
when Hash, Array, Time, String then ImmutableRequestValue.capture(value)
|
|
71
70
|
else value
|
|
72
71
|
end
|
|
73
72
|
end
|
|
74
|
-
|
|
75
|
-
def immutable_value_hash(value)
|
|
76
|
-
value.to_h { |key, item| [immutable_value(key), immutable_value(item)] }.freeze
|
|
77
|
-
end
|
|
78
73
|
end
|
|
79
74
|
|
|
80
75
|
# One page of a durable function's executions, most recent first.
|
data/lib/volcano/version.rb
CHANGED