temporalio 0.2.0-x86_64-darwin → 0.3.0-x86_64-darwin
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/.yardopts +2 -0
- data/Gemfile +3 -3
- data/Rakefile +10 -296
- data/lib/temporalio/activity/complete_async_error.rb +1 -1
- data/lib/temporalio/activity/context.rb +5 -2
- data/lib/temporalio/activity/definition.rb +163 -65
- data/lib/temporalio/activity/info.rb +22 -21
- data/lib/temporalio/activity.rb +2 -59
- data/lib/temporalio/api/activity/v1/message.rb +25 -0
- data/lib/temporalio/api/cloud/account/v1/message.rb +28 -0
- data/lib/temporalio/api/cloud/cloudservice/v1/request_response.rb +34 -1
- data/lib/temporalio/api/cloud/cloudservice/v1/service.rb +1 -1
- data/lib/temporalio/api/cloud/identity/v1/message.rb +6 -1
- data/lib/temporalio/api/cloud/namespace/v1/message.rb +8 -1
- data/lib/temporalio/api/cloud/nexus/v1/message.rb +31 -0
- data/lib/temporalio/api/cloud/operation/v1/message.rb +2 -1
- data/lib/temporalio/api/cloud/region/v1/message.rb +2 -1
- data/lib/temporalio/api/cloud/resource/v1/message.rb +23 -0
- data/lib/temporalio/api/cloud/sink/v1/message.rb +24 -0
- data/lib/temporalio/api/cloud/usage/v1/message.rb +31 -0
- data/lib/temporalio/api/common/v1/message.rb +7 -1
- data/lib/temporalio/api/enums/v1/event_type.rb +1 -1
- data/lib/temporalio/api/enums/v1/failed_cause.rb +1 -1
- data/lib/temporalio/api/enums/v1/reset.rb +1 -1
- data/lib/temporalio/api/history/v1/message.rb +1 -1
- data/lib/temporalio/api/nexus/v1/message.rb +2 -2
- data/lib/temporalio/api/operatorservice/v1/service.rb +1 -1
- data/lib/temporalio/api/payload_visitor.rb +1513 -0
- data/lib/temporalio/api/schedule/v1/message.rb +2 -1
- data/lib/temporalio/api/testservice/v1/request_response.rb +31 -0
- data/lib/temporalio/api/testservice/v1/service.rb +23 -0
- data/lib/temporalio/api/workflow/v1/message.rb +1 -1
- data/lib/temporalio/api/workflowservice/v1/request_response.rb +17 -2
- data/lib/temporalio/api/workflowservice/v1/service.rb +1 -1
- data/lib/temporalio/api.rb +1 -0
- data/lib/temporalio/cancellation.rb +34 -14
- data/lib/temporalio/client/async_activity_handle.rb +12 -37
- data/lib/temporalio/client/connection/cloud_service.rb +309 -231
- data/lib/temporalio/client/connection/operator_service.rb +36 -84
- data/lib/temporalio/client/connection/service.rb +6 -5
- data/lib/temporalio/client/connection/test_service.rb +111 -0
- data/lib/temporalio/client/connection/workflow_service.rb +264 -441
- data/lib/temporalio/client/connection.rb +90 -44
- data/lib/temporalio/client/interceptor.rb +160 -60
- data/lib/temporalio/client/schedule.rb +967 -0
- data/lib/temporalio/client/schedule_handle.rb +126 -0
- data/lib/temporalio/client/workflow_execution.rb +7 -10
- data/lib/temporalio/client/workflow_handle.rb +38 -95
- data/lib/temporalio/client/workflow_update_handle.rb +3 -5
- data/lib/temporalio/client.rb +122 -42
- data/lib/temporalio/common_enums.rb +17 -0
- data/lib/temporalio/converters/data_converter.rb +4 -7
- data/lib/temporalio/converters/failure_converter.rb +5 -3
- data/lib/temporalio/converters/payload_converter/composite.rb +4 -0
- data/lib/temporalio/converters/payload_converter.rb +6 -8
- data/lib/temporalio/converters/raw_value.rb +20 -0
- data/lib/temporalio/error/failure.rb +1 -1
- data/lib/temporalio/error.rb +10 -2
- data/lib/temporalio/internal/bridge/3.2/temporalio_bridge.bundle +0 -0
- data/lib/temporalio/internal/bridge/3.3/temporalio_bridge.bundle +0 -0
- data/lib/temporalio/internal/bridge/{3.1 → 3.4}/temporalio_bridge.bundle +0 -0
- data/lib/temporalio/internal/bridge/api/core_interface.rb +5 -1
- data/lib/temporalio/internal/bridge/api/nexus/nexus.rb +33 -0
- data/lib/temporalio/internal/bridge/api/workflow_activation/workflow_activation.rb +5 -1
- data/lib/temporalio/internal/bridge/api/workflow_commands/workflow_commands.rb +4 -1
- data/lib/temporalio/internal/bridge/client.rb +11 -6
- data/lib/temporalio/internal/bridge/testing.rb +20 -0
- data/lib/temporalio/internal/bridge/worker.rb +2 -0
- data/lib/temporalio/internal/bridge.rb +1 -1
- data/lib/temporalio/internal/client/implementation.rb +245 -70
- data/lib/temporalio/internal/metric.rb +122 -0
- data/lib/temporalio/internal/proto_utils.rb +86 -7
- data/lib/temporalio/internal/worker/activity_worker.rb +52 -24
- data/lib/temporalio/internal/worker/multi_runner.rb +51 -7
- data/lib/temporalio/internal/worker/workflow_instance/child_workflow_handle.rb +54 -0
- data/lib/temporalio/internal/worker/workflow_instance/context.rb +329 -0
- data/lib/temporalio/internal/worker/workflow_instance/details.rb +44 -0
- data/lib/temporalio/internal/worker/workflow_instance/external_workflow_handle.rb +32 -0
- data/lib/temporalio/internal/worker/workflow_instance/externally_immutable_hash.rb +22 -0
- data/lib/temporalio/internal/worker/workflow_instance/handler_execution.rb +25 -0
- data/lib/temporalio/internal/worker/workflow_instance/handler_hash.rb +41 -0
- data/lib/temporalio/internal/worker/workflow_instance/illegal_call_tracer.rb +97 -0
- data/lib/temporalio/internal/worker/workflow_instance/inbound_implementation.rb +62 -0
- data/lib/temporalio/internal/worker/workflow_instance/outbound_implementation.rb +415 -0
- data/lib/temporalio/internal/worker/workflow_instance/replay_safe_logger.rb +37 -0
- data/lib/temporalio/internal/worker/workflow_instance/replay_safe_metric.rb +40 -0
- data/lib/temporalio/internal/worker/workflow_instance/scheduler.rb +163 -0
- data/lib/temporalio/internal/worker/workflow_instance.rb +730 -0
- data/lib/temporalio/internal/worker/workflow_worker.rb +196 -0
- data/lib/temporalio/metric.rb +109 -0
- data/lib/temporalio/retry_policy.rb +37 -14
- data/lib/temporalio/runtime.rb +118 -75
- data/lib/temporalio/search_attributes.rb +80 -37
- data/lib/temporalio/testing/activity_environment.rb +2 -2
- data/lib/temporalio/testing/workflow_environment.rb +251 -5
- data/lib/temporalio/version.rb +1 -1
- data/lib/temporalio/worker/activity_executor/thread_pool.rb +9 -217
- data/lib/temporalio/worker/activity_executor.rb +3 -3
- data/lib/temporalio/worker/interceptor.rb +340 -66
- data/lib/temporalio/worker/thread_pool.rb +237 -0
- data/lib/temporalio/worker/workflow_executor/thread_pool.rb +230 -0
- data/lib/temporalio/worker/workflow_executor.rb +26 -0
- data/lib/temporalio/worker.rb +201 -30
- data/lib/temporalio/workflow/activity_cancellation_type.rb +20 -0
- data/lib/temporalio/workflow/child_workflow_cancellation_type.rb +21 -0
- data/lib/temporalio/workflow/child_workflow_handle.rb +43 -0
- data/lib/temporalio/workflow/definition.rb +566 -0
- data/lib/temporalio/workflow/external_workflow_handle.rb +41 -0
- data/lib/temporalio/workflow/future.rb +151 -0
- data/lib/temporalio/workflow/handler_unfinished_policy.rb +13 -0
- data/lib/temporalio/workflow/info.rb +82 -0
- data/lib/temporalio/workflow/parent_close_policy.rb +19 -0
- data/lib/temporalio/workflow/update_info.rb +20 -0
- data/lib/temporalio/workflow.rb +523 -0
- data/lib/temporalio.rb +4 -0
- data/temporalio.gemspec +2 -2
- metadata +52 -6
@@ -14,8 +14,7 @@ module Temporalio
|
|
14
14
|
# Connection to Temporal server that is not namespace specific. Most users will use {Client.connect} instead of this
|
15
15
|
# directly.
|
16
16
|
class Connection
|
17
|
-
|
18
|
-
Options = Struct.new(
|
17
|
+
Options = Data.define(
|
19
18
|
:target_host,
|
20
19
|
:api_key,
|
21
20
|
:tls,
|
@@ -25,8 +24,17 @@ module Temporalio
|
|
25
24
|
:keep_alive,
|
26
25
|
:http_connect_proxy,
|
27
26
|
:runtime,
|
28
|
-
:lazy_connect
|
29
|
-
|
27
|
+
:lazy_connect
|
28
|
+
)
|
29
|
+
|
30
|
+
# Options as returned from {options} for +**to_h+ splat use in {initialize}. See {initialize} for details.
|
31
|
+
class Options; end # rubocop:disable Lint/EmptyClass
|
32
|
+
|
33
|
+
TLSOptions = Data.define(
|
34
|
+
:client_cert,
|
35
|
+
:client_private_key,
|
36
|
+
:server_root_ca_cert,
|
37
|
+
:domain
|
30
38
|
)
|
31
39
|
|
32
40
|
# TLS options. All attributes are optional, and an empty options set just enables default TLS.
|
@@ -41,12 +49,24 @@ module Temporalio
|
|
41
49
|
# @!attribute domain
|
42
50
|
# @return [String, nil] SNI override. This is only needed for self-hosted servers with certificates that do not
|
43
51
|
# match the hostname being connected to.
|
44
|
-
TLSOptions
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
52
|
+
class TLSOptions
|
53
|
+
def initialize(
|
54
|
+
client_cert: nil,
|
55
|
+
client_private_key: nil,
|
56
|
+
server_root_ca_cert: nil,
|
57
|
+
domain: nil
|
58
|
+
)
|
59
|
+
super
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
RPCRetryOptions = Data.define(
|
64
|
+
:initial_interval,
|
65
|
+
:randomization_factor,
|
66
|
+
:multiplier,
|
67
|
+
:max_interval,
|
68
|
+
:max_elapsed_time,
|
69
|
+
:max_retries
|
50
70
|
)
|
51
71
|
|
52
72
|
# Retry options for server calls when retry is enabled (which it is by default on all high-level {Client} calls).
|
@@ -64,27 +84,24 @@ module Temporalio
|
|
64
84
|
# @return [Float] Maximum total time, default 10.0. Can use 0 for no max.
|
65
85
|
# @!attribute max_retries
|
66
86
|
# @return [Integer] Maximum number of retries, default 10.
|
67
|
-
RPCRetryOptions
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
def initialize(**kwargs)
|
77
|
-
# @type var kwargs: untyped
|
78
|
-
kwargs[:initial_interval] = 0.1 unless kwargs.key?(:initial_interval)
|
79
|
-
kwargs[:randomization_factor] = 0.2 unless kwargs.key?(:randomization_factor)
|
80
|
-
kwargs[:multiplier] = 1.5 unless kwargs.key?(:multiplier)
|
81
|
-
kwargs[:max_interval] = 5.0 unless kwargs.key?(:max_interval)
|
82
|
-
kwargs[:max_elapsed_time] = 10.0 unless kwargs.key?(:max_elapsed_time)
|
83
|
-
kwargs[:max_retries] = 10 unless kwargs.key?(:max_retries)
|
87
|
+
class RPCRetryOptions
|
88
|
+
def initialize(
|
89
|
+
initial_interval: 0.1,
|
90
|
+
randomization_factor: 0.2,
|
91
|
+
multiplier: 1.5,
|
92
|
+
max_interval: 5.0,
|
93
|
+
max_elapsed_time: 10.0,
|
94
|
+
max_retries: 10
|
95
|
+
)
|
84
96
|
super
|
85
97
|
end
|
86
98
|
end
|
87
99
|
|
100
|
+
KeepAliveOptions = Data.define(
|
101
|
+
:interval,
|
102
|
+
:timeout
|
103
|
+
)
|
104
|
+
|
88
105
|
# Keep-alive options for client connections. For most users, the default is preferred.
|
89
106
|
#
|
90
107
|
# @!attribute interval
|
@@ -92,19 +109,18 @@ module Temporalio
|
|
92
109
|
# @!attribute timeout
|
93
110
|
# @return [Float] Timeout that the keep alive must be responded to within or the connection will be closed,
|
94
111
|
# default 15.0.
|
95
|
-
KeepAliveOptions
|
96
|
-
:
|
97
|
-
:timeout,
|
98
|
-
keyword_init: true
|
99
|
-
) do
|
100
|
-
def initialize(**kwargs)
|
101
|
-
# @type var kwargs: untyped
|
102
|
-
kwargs[:interval] = 30.0 unless kwargs.key?(:interval)
|
103
|
-
kwargs[:timeout] = 15.0 unless kwargs.key?(:timeout)
|
112
|
+
class KeepAliveOptions
|
113
|
+
def initialize(interval: 30.0, timeout: 15.0)
|
104
114
|
super
|
105
115
|
end
|
106
116
|
end
|
107
117
|
|
118
|
+
HTTPConnectProxyOptions = Data.define(
|
119
|
+
:target_host,
|
120
|
+
:basic_auth_user,
|
121
|
+
:basic_auth_pass
|
122
|
+
)
|
123
|
+
|
108
124
|
# Options for HTTP CONNECT proxy for client connections.
|
109
125
|
#
|
110
126
|
# @!attribute target_host
|
@@ -113,14 +129,11 @@ module Temporalio
|
|
113
129
|
# @return [String, nil] User for HTTP basic auth for the proxy, must be combined with {basic_auth_pass}.
|
114
130
|
# @!attribute basic_auth_pass
|
115
131
|
# @return [String, nil] Pass for HTTP basic auth for the proxy, must be combined with {basic_auth_user}.
|
116
|
-
HTTPConnectProxyOptions
|
117
|
-
:target_host,
|
118
|
-
:basic_auth_user, # Optional
|
119
|
-
:basic_auth_pass, # Optional,
|
120
|
-
keyword_init: true
|
121
|
-
)
|
132
|
+
class HTTPConnectProxyOptions; end # rubocop:disable Lint/EmptyClass
|
122
133
|
|
123
|
-
# @return [Options] Frozen options for this client which has the same attributes as {initialize}.
|
134
|
+
# @return [Options] Frozen options for this client which has the same attributes as {initialize}. Note that if
|
135
|
+
# {api_key=} or {rpc_metadata=} are updated, the options object is replaced with those changes (it is not
|
136
|
+
# mutated in place).
|
124
137
|
attr_reader :options
|
125
138
|
|
126
139
|
# @return [WorkflowService] Raw gRPC workflow service.
|
@@ -181,6 +194,7 @@ module Temporalio
|
|
181
194
|
lazy_connect:
|
182
195
|
).freeze
|
183
196
|
# Create core client now if not lazy
|
197
|
+
@core_client_mutex = Mutex.new
|
184
198
|
_core_client unless lazy_connect
|
185
199
|
# Create service instances
|
186
200
|
@workflow_service = WorkflowService.new(self)
|
@@ -204,11 +218,43 @@ module Temporalio
|
|
204
218
|
!@core_client.nil?
|
205
219
|
end
|
206
220
|
|
221
|
+
# @return [String, nil] API key. This is a shortcut for `options.api_key`.
|
222
|
+
def api_key
|
223
|
+
@options.api_key
|
224
|
+
end
|
225
|
+
|
226
|
+
# Set the API key for all future calls. This also makes a new object for {options} with the changes.
|
227
|
+
#
|
228
|
+
# @param new_key [String, nil] New API key.
|
229
|
+
def api_key=(new_key)
|
230
|
+
# Mutate the client if connected then mutate options
|
231
|
+
@core_client_mutex.synchronize do
|
232
|
+
@core_client&.update_api_key(new_key)
|
233
|
+
@options = @options.with(api_key: new_key)
|
234
|
+
end
|
235
|
+
end
|
236
|
+
|
237
|
+
# @return [Hash<String, String>] RPC metadata (aka HTTP headers). This is a shortcut for `options.rpc_metadata`.
|
238
|
+
def rpc_metadata
|
239
|
+
@options.rpc_metadata
|
240
|
+
end
|
241
|
+
|
242
|
+
# Set the RPC metadata (aka HTTP headers) for all future calls. This also makes a new object for {options} with
|
243
|
+
# the changes.
|
244
|
+
#
|
245
|
+
# @param rpc_metadata [Hash<String, String>] New API key.
|
246
|
+
def rpc_metadata=(rpc_metadata)
|
247
|
+
# Mutate the client if connected then mutate options
|
248
|
+
@core_client_mutex.synchronize do
|
249
|
+
@core_client&.update_metadata(rpc_metadata)
|
250
|
+
@options = @options.with(rpc_metadata: rpc_metadata)
|
251
|
+
end
|
252
|
+
end
|
253
|
+
|
207
254
|
# @!visibility private
|
208
255
|
def _core_client
|
209
256
|
# If lazy, this needs to be done under mutex
|
210
257
|
if @options.lazy_connect
|
211
|
-
@core_client_mutex ||= Mutex.new
|
212
258
|
@core_client_mutex.synchronize do
|
213
259
|
@core_client ||= new_core_client
|
214
260
|
end
|
@@ -18,7 +18,7 @@ module Temporalio
|
|
18
18
|
end
|
19
19
|
|
20
20
|
# Input for {Outbound.start_workflow}.
|
21
|
-
StartWorkflowInput =
|
21
|
+
StartWorkflowInput = Data.define(
|
22
22
|
:workflow,
|
23
23
|
:args,
|
24
24
|
:workflow_id,
|
@@ -35,75 +35,61 @@ module Temporalio
|
|
35
35
|
:start_delay,
|
36
36
|
:request_eager_start,
|
37
37
|
:headers,
|
38
|
-
:
|
39
|
-
:rpc_timeout,
|
40
|
-
keyword_init: true
|
38
|
+
:rpc_options
|
41
39
|
)
|
42
40
|
|
43
41
|
# Input for {Outbound.list_workflows}.
|
44
|
-
ListWorkflowsInput =
|
42
|
+
ListWorkflowsInput = Data.define(
|
45
43
|
:query,
|
46
|
-
:
|
47
|
-
:rpc_timeout,
|
48
|
-
keyword_init: true
|
44
|
+
:rpc_options
|
49
45
|
)
|
50
46
|
|
51
47
|
# Input for {Outbound.count_workflows}.
|
52
|
-
CountWorkflowsInput =
|
48
|
+
CountWorkflowsInput = Data.define(
|
53
49
|
:query,
|
54
|
-
:
|
55
|
-
:rpc_timeout,
|
56
|
-
keyword_init: true
|
50
|
+
:rpc_options
|
57
51
|
)
|
58
52
|
|
59
53
|
# Input for {Outbound.describe_workflow}.
|
60
|
-
DescribeWorkflowInput =
|
54
|
+
DescribeWorkflowInput = Data.define(
|
61
55
|
:workflow_id,
|
62
56
|
:run_id,
|
63
|
-
:
|
64
|
-
:rpc_timeout,
|
65
|
-
keyword_init: true
|
57
|
+
:rpc_options
|
66
58
|
)
|
67
59
|
|
68
60
|
# Input for {Outbound.fetch_workflow_history_events}.
|
69
|
-
FetchWorkflowHistoryEventsInput =
|
61
|
+
FetchWorkflowHistoryEventsInput = Data.define(
|
70
62
|
:workflow_id,
|
71
63
|
:run_id,
|
72
64
|
:wait_new_event,
|
73
65
|
:event_filter_type,
|
74
66
|
:skip_archival,
|
75
|
-
:
|
76
|
-
:rpc_timeout,
|
77
|
-
keyword_init: true
|
67
|
+
:rpc_options
|
78
68
|
)
|
79
69
|
|
80
70
|
# Input for {Outbound.signal_workflow}.
|
81
|
-
SignalWorkflowInput =
|
71
|
+
SignalWorkflowInput = Data.define(
|
82
72
|
:workflow_id,
|
83
73
|
:run_id,
|
84
74
|
:signal,
|
85
75
|
:args,
|
86
76
|
:headers,
|
87
|
-
:
|
88
|
-
:rpc_timeout,
|
89
|
-
keyword_init: true
|
77
|
+
:rpc_options
|
90
78
|
)
|
91
79
|
|
92
80
|
# Input for {Outbound.query_workflow}.
|
93
|
-
QueryWorkflowInput =
|
81
|
+
QueryWorkflowInput = Data.define(
|
94
82
|
:workflow_id,
|
95
83
|
:run_id,
|
96
84
|
:query,
|
97
85
|
:args,
|
98
86
|
:reject_condition,
|
99
87
|
:headers,
|
100
|
-
:
|
101
|
-
:rpc_timeout,
|
102
|
-
keyword_init: true
|
88
|
+
:rpc_options
|
103
89
|
)
|
104
90
|
|
105
91
|
# Input for {Outbound.start_workflow_update}.
|
106
|
-
StartWorkflowUpdateInput =
|
92
|
+
StartWorkflowUpdateInput = Data.define(
|
107
93
|
:workflow_id,
|
108
94
|
:run_id,
|
109
95
|
:update_id,
|
@@ -111,78 +97,126 @@ module Temporalio
|
|
111
97
|
:args,
|
112
98
|
:wait_for_stage,
|
113
99
|
:headers,
|
114
|
-
:
|
115
|
-
:rpc_timeout,
|
116
|
-
keyword_init: true
|
100
|
+
:rpc_options
|
117
101
|
)
|
118
102
|
|
119
103
|
# Input for {Outbound.poll_workflow_update}.
|
120
|
-
PollWorkflowUpdateInput =
|
104
|
+
PollWorkflowUpdateInput = Data.define(
|
121
105
|
:workflow_id,
|
122
106
|
:run_id,
|
123
107
|
:update_id,
|
124
|
-
:
|
125
|
-
:rpc_timeout,
|
126
|
-
keyword_init: true
|
108
|
+
:rpc_options
|
127
109
|
)
|
128
110
|
|
129
111
|
# Input for {Outbound.cancel_workflow}.
|
130
|
-
CancelWorkflowInput =
|
112
|
+
CancelWorkflowInput = Data.define(
|
131
113
|
:workflow_id,
|
132
114
|
:run_id,
|
133
115
|
:first_execution_run_id,
|
134
|
-
:
|
135
|
-
:rpc_timeout,
|
136
|
-
keyword_init: true
|
116
|
+
:rpc_options
|
137
117
|
)
|
138
118
|
|
139
119
|
# Input for {Outbound.terminate_workflow}.
|
140
|
-
TerminateWorkflowInput =
|
120
|
+
TerminateWorkflowInput = Data.define(
|
141
121
|
:workflow_id,
|
142
122
|
:run_id,
|
143
123
|
:first_execution_run_id,
|
144
124
|
:reason,
|
145
125
|
:details,
|
146
|
-
:
|
147
|
-
|
148
|
-
|
126
|
+
:rpc_options
|
127
|
+
)
|
128
|
+
|
129
|
+
# Input for {Outbound.create_schedule}.
|
130
|
+
CreateScheduleInput = Data.define(
|
131
|
+
:id,
|
132
|
+
:schedule,
|
133
|
+
:trigger_immediately,
|
134
|
+
:backfills,
|
135
|
+
:memo,
|
136
|
+
:search_attributes,
|
137
|
+
:rpc_options
|
138
|
+
)
|
139
|
+
|
140
|
+
# Input for {Outbound.list_schedules}.
|
141
|
+
ListSchedulesInput = Data.define(
|
142
|
+
:query,
|
143
|
+
:rpc_options
|
144
|
+
)
|
145
|
+
|
146
|
+
# Input for {Outbound.backfill_schedule}.
|
147
|
+
BackfillScheduleInput = Data.define(
|
148
|
+
:id,
|
149
|
+
:backfills,
|
150
|
+
:rpc_options
|
151
|
+
)
|
152
|
+
|
153
|
+
# Input for {Outbound.delete_schedule}.
|
154
|
+
DeleteScheduleInput = Data.define(
|
155
|
+
:id,
|
156
|
+
:rpc_options
|
157
|
+
)
|
158
|
+
|
159
|
+
# Input for {Outbound.describe_schedule}.
|
160
|
+
DescribeScheduleInput = Data.define(
|
161
|
+
:id,
|
162
|
+
:rpc_options
|
163
|
+
)
|
164
|
+
|
165
|
+
# Input for {Outbound.pause_schedule}.
|
166
|
+
PauseScheduleInput = Data.define(
|
167
|
+
:id,
|
168
|
+
:note,
|
169
|
+
:rpc_options
|
170
|
+
)
|
171
|
+
|
172
|
+
# Input for {Outbound.trigger_schedule}.
|
173
|
+
TriggerScheduleInput = Data.define(
|
174
|
+
:id,
|
175
|
+
:overlap,
|
176
|
+
:rpc_options
|
177
|
+
)
|
178
|
+
|
179
|
+
# Input for {Outbound.unpause_schedule}.
|
180
|
+
UnpauseScheduleInput = Data.define(
|
181
|
+
:id,
|
182
|
+
:note,
|
183
|
+
:rpc_options
|
184
|
+
)
|
185
|
+
|
186
|
+
# Input for {Outbound.update_schedule}.
|
187
|
+
UpdateScheduleInput = Data.define(
|
188
|
+
:id,
|
189
|
+
:updater,
|
190
|
+
:rpc_options
|
149
191
|
)
|
150
192
|
|
151
193
|
# Input for {Outbound.heartbeat_async_activity}.
|
152
|
-
HeartbeatAsyncActivityInput =
|
194
|
+
HeartbeatAsyncActivityInput = Data.define(
|
153
195
|
:task_token_or_id_reference,
|
154
196
|
:details,
|
155
|
-
:
|
156
|
-
:rpc_timeout,
|
157
|
-
keyword_init: true
|
197
|
+
:rpc_options
|
158
198
|
)
|
159
199
|
|
160
200
|
# Input for {Outbound.complete_async_activity}.
|
161
|
-
CompleteAsyncActivityInput =
|
201
|
+
CompleteAsyncActivityInput = Data.define(
|
162
202
|
:task_token_or_id_reference,
|
163
203
|
:result,
|
164
|
-
:
|
165
|
-
:rpc_timeout,
|
166
|
-
keyword_init: true
|
204
|
+
:rpc_options
|
167
205
|
)
|
168
206
|
|
169
207
|
# Input for {Outbound.fail_async_activity}.
|
170
|
-
FailAsyncActivityInput =
|
208
|
+
FailAsyncActivityInput = Data.define(
|
171
209
|
:task_token_or_id_reference,
|
172
210
|
:error,
|
173
211
|
:last_heartbeat_details,
|
174
|
-
:
|
175
|
-
:rpc_timeout,
|
176
|
-
keyword_init: true
|
212
|
+
:rpc_options
|
177
213
|
)
|
178
214
|
|
179
215
|
# Input for {Outbound.report_cancellation_async_activity}.
|
180
|
-
ReportCancellationAsyncActivityInput =
|
216
|
+
ReportCancellationAsyncActivityInput = Data.define(
|
181
217
|
:task_token_or_id_reference,
|
182
218
|
:details,
|
183
|
-
:
|
184
|
-
:rpc_timeout,
|
185
|
-
keyword_init: true
|
219
|
+
:rpc_options
|
186
220
|
)
|
187
221
|
|
188
222
|
# Outbound interceptor for intercepting client calls. This should be extended by users needing to intercept client
|
@@ -283,6 +317,72 @@ module Temporalio
|
|
283
317
|
next_interceptor.terminate_workflow(input)
|
284
318
|
end
|
285
319
|
|
320
|
+
# Called for every {Client.create_schedule} call.
|
321
|
+
#
|
322
|
+
# @param input [CreateScheduleInput] Input.
|
323
|
+
# @return [ScheduleHandle] Schedule handle.
|
324
|
+
def create_schedule(input)
|
325
|
+
next_interceptor.create_schedule(input)
|
326
|
+
end
|
327
|
+
|
328
|
+
# Called for every {Client.list_schedules} call.
|
329
|
+
#
|
330
|
+
# @param input [ListSchedulesInput] Input.
|
331
|
+
# @return [Enumerator<Schedule::List::Description>] Enumerable schedules.
|
332
|
+
def list_schedules(input)
|
333
|
+
next_interceptor.list_schedules(input)
|
334
|
+
end
|
335
|
+
|
336
|
+
# Called for every {ScheduleHandle.backfill} call.
|
337
|
+
#
|
338
|
+
# @param input [BackfillScheduleInput] Input.
|
339
|
+
def backfill_schedule(input)
|
340
|
+
next_interceptor.backfill_schedule(input)
|
341
|
+
end
|
342
|
+
|
343
|
+
# Called for every {ScheduleHandle.delete} call.
|
344
|
+
#
|
345
|
+
# @param input [DeleteScheduleInput] Input.
|
346
|
+
def delete_schedule(input)
|
347
|
+
next_interceptor.delete_schedule(input)
|
348
|
+
end
|
349
|
+
|
350
|
+
# Called for every {ScheduleHandle.describe} call.
|
351
|
+
#
|
352
|
+
# @param input [DescribeScheduleInput] Input.
|
353
|
+
# @return [Schedule::Description] Schedule description.
|
354
|
+
def describe_schedule(input)
|
355
|
+
next_interceptor.describe_schedule(input)
|
356
|
+
end
|
357
|
+
|
358
|
+
# Called for every {ScheduleHandle.pause} call.
|
359
|
+
#
|
360
|
+
# @param input [PauseScheduleInput] Input.
|
361
|
+
def pause_schedule(input)
|
362
|
+
next_interceptor.pause_schedule(input)
|
363
|
+
end
|
364
|
+
|
365
|
+
# Called for every {ScheduleHandle.trigger} call.
|
366
|
+
#
|
367
|
+
# @param input [TriggerScheduleInput] Input.
|
368
|
+
def trigger_schedule(input)
|
369
|
+
next_interceptor.trigger_schedule(input)
|
370
|
+
end
|
371
|
+
|
372
|
+
# Called for every {ScheduleHandle.unpause} call.
|
373
|
+
#
|
374
|
+
# @param input [UnpauseScheduleInput] Input.
|
375
|
+
def unpause_schedule(input)
|
376
|
+
next_interceptor.unpause_schedule(input)
|
377
|
+
end
|
378
|
+
|
379
|
+
# Called for every {ScheduleHandle.update} call.
|
380
|
+
#
|
381
|
+
# @param input [UpdateScheduleInput] Input.
|
382
|
+
def update_schedule(input)
|
383
|
+
next_interceptor.update_schedule(input)
|
384
|
+
end
|
385
|
+
|
286
386
|
# Called for every {AsyncActivityHandle.heartbeat} call.
|
287
387
|
#
|
288
388
|
# @param input [HeartbeatAsyncActivityInput] Input.
|