amit-temporalio 0.3.0-arm64-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 +7 -0
- data/.yardopts +2 -0
- data/Gemfile +23 -0
- data/Rakefile +101 -0
- data/lib/temporalio/activity/complete_async_error.rb +11 -0
- data/lib/temporalio/activity/context.rb +116 -0
- data/lib/temporalio/activity/definition.rb +189 -0
- data/lib/temporalio/activity/info.rb +64 -0
- data/lib/temporalio/activity.rb +12 -0
- data/lib/temporalio/api/activity/v1/message.rb +25 -0
- data/lib/temporalio/api/batch/v1/message.rb +31 -0
- data/lib/temporalio/api/cloud/account/v1/message.rb +28 -0
- data/lib/temporalio/api/cloud/cloudservice/v1/request_response.rb +126 -0
- data/lib/temporalio/api/cloud/cloudservice/v1/service.rb +25 -0
- data/lib/temporalio/api/cloud/cloudservice.rb +3 -0
- data/lib/temporalio/api/cloud/identity/v1/message.rb +41 -0
- data/lib/temporalio/api/cloud/namespace/v1/message.rb +42 -0
- data/lib/temporalio/api/cloud/nexus/v1/message.rb +31 -0
- data/lib/temporalio/api/cloud/operation/v1/message.rb +28 -0
- data/lib/temporalio/api/cloud/region/v1/message.rb +24 -0
- 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/command/v1/message.rb +46 -0
- data/lib/temporalio/api/common/v1/grpc_status.rb +23 -0
- data/lib/temporalio/api/common/v1/message.rb +47 -0
- data/lib/temporalio/api/enums/v1/batch_operation.rb +22 -0
- data/lib/temporalio/api/enums/v1/command_type.rb +21 -0
- data/lib/temporalio/api/enums/v1/common.rb +26 -0
- data/lib/temporalio/api/enums/v1/event_type.rb +21 -0
- data/lib/temporalio/api/enums/v1/failed_cause.rb +26 -0
- data/lib/temporalio/api/enums/v1/namespace.rb +23 -0
- data/lib/temporalio/api/enums/v1/query.rb +22 -0
- data/lib/temporalio/api/enums/v1/reset.rb +23 -0
- data/lib/temporalio/api/enums/v1/schedule.rb +21 -0
- data/lib/temporalio/api/enums/v1/task_queue.rb +25 -0
- data/lib/temporalio/api/enums/v1/update.rb +22 -0
- data/lib/temporalio/api/enums/v1/workflow.rb +30 -0
- data/lib/temporalio/api/errordetails/v1/message.rb +42 -0
- data/lib/temporalio/api/export/v1/message.rb +24 -0
- data/lib/temporalio/api/failure/v1/message.rb +35 -0
- data/lib/temporalio/api/filter/v1/message.rb +27 -0
- data/lib/temporalio/api/history/v1/message.rb +90 -0
- data/lib/temporalio/api/namespace/v1/message.rb +31 -0
- data/lib/temporalio/api/nexus/v1/message.rb +40 -0
- data/lib/temporalio/api/operatorservice/v1/request_response.rb +49 -0
- data/lib/temporalio/api/operatorservice/v1/service.rb +23 -0
- data/lib/temporalio/api/operatorservice.rb +3 -0
- data/lib/temporalio/api/payload_visitor.rb +1513 -0
- data/lib/temporalio/api/protocol/v1/message.rb +23 -0
- data/lib/temporalio/api/query/v1/message.rb +27 -0
- data/lib/temporalio/api/replication/v1/message.rb +26 -0
- data/lib/temporalio/api/schedule/v1/message.rb +43 -0
- data/lib/temporalio/api/sdk/v1/enhanced_stack_trace.rb +25 -0
- data/lib/temporalio/api/sdk/v1/task_complete_metadata.rb +21 -0
- data/lib/temporalio/api/sdk/v1/user_metadata.rb +23 -0
- data/lib/temporalio/api/sdk/v1/workflow_metadata.rb +23 -0
- data/lib/temporalio/api/taskqueue/v1/message.rb +45 -0
- 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/update/v1/message.rb +33 -0
- data/lib/temporalio/api/version/v1/message.rb +26 -0
- data/lib/temporalio/api/workflow/v1/message.rb +43 -0
- data/lib/temporalio/api/workflowservice/v1/request_response.rb +204 -0
- data/lib/temporalio/api/workflowservice/v1/service.rb +23 -0
- data/lib/temporalio/api/workflowservice.rb +3 -0
- data/lib/temporalio/api.rb +14 -0
- data/lib/temporalio/cancellation.rb +170 -0
- data/lib/temporalio/client/activity_id_reference.rb +32 -0
- data/lib/temporalio/client/async_activity_handle.rb +85 -0
- data/lib/temporalio/client/connection/cloud_service.rb +726 -0
- data/lib/temporalio/client/connection/operator_service.rb +201 -0
- data/lib/temporalio/client/connection/service.rb +42 -0
- data/lib/temporalio/client/connection/test_service.rb +111 -0
- data/lib/temporalio/client/connection/workflow_service.rb +1041 -0
- data/lib/temporalio/client/connection.rb +316 -0
- data/lib/temporalio/client/interceptor.rb +416 -0
- data/lib/temporalio/client/schedule.rb +967 -0
- data/lib/temporalio/client/schedule_handle.rb +126 -0
- data/lib/temporalio/client/workflow_execution.rb +100 -0
- data/lib/temporalio/client/workflow_execution_count.rb +36 -0
- data/lib/temporalio/client/workflow_execution_status.rb +18 -0
- data/lib/temporalio/client/workflow_handle.rb +389 -0
- data/lib/temporalio/client/workflow_query_reject_condition.rb +14 -0
- data/lib/temporalio/client/workflow_update_handle.rb +65 -0
- data/lib/temporalio/client/workflow_update_wait_stage.rb +17 -0
- data/lib/temporalio/client.rb +484 -0
- data/lib/temporalio/common_enums.rb +41 -0
- data/lib/temporalio/converters/data_converter.rb +99 -0
- data/lib/temporalio/converters/failure_converter.rb +202 -0
- data/lib/temporalio/converters/payload_codec.rb +26 -0
- data/lib/temporalio/converters/payload_converter/binary_null.rb +34 -0
- data/lib/temporalio/converters/payload_converter/binary_plain.rb +35 -0
- data/lib/temporalio/converters/payload_converter/binary_protobuf.rb +42 -0
- data/lib/temporalio/converters/payload_converter/composite.rb +66 -0
- data/lib/temporalio/converters/payload_converter/encoding.rb +35 -0
- data/lib/temporalio/converters/payload_converter/json_plain.rb +44 -0
- data/lib/temporalio/converters/payload_converter/json_protobuf.rb +41 -0
- data/lib/temporalio/converters/payload_converter.rb +71 -0
- data/lib/temporalio/converters/raw_value.rb +20 -0
- data/lib/temporalio/converters.rb +9 -0
- data/lib/temporalio/error/failure.rb +219 -0
- data/lib/temporalio/error.rb +155 -0
- data/lib/temporalio/internal/bridge/api/activity_result/activity_result.rb +34 -0
- data/lib/temporalio/internal/bridge/api/activity_task/activity_task.rb +31 -0
- data/lib/temporalio/internal/bridge/api/child_workflow/child_workflow.rb +33 -0
- data/lib/temporalio/internal/bridge/api/common/common.rb +26 -0
- data/lib/temporalio/internal/bridge/api/core_interface.rb +40 -0
- data/lib/temporalio/internal/bridge/api/external_data/external_data.rb +27 -0
- data/lib/temporalio/internal/bridge/api/nexus/nexus.rb +33 -0
- data/lib/temporalio/internal/bridge/api/workflow_activation/workflow_activation.rb +56 -0
- data/lib/temporalio/internal/bridge/api/workflow_commands/workflow_commands.rb +57 -0
- data/lib/temporalio/internal/bridge/api/workflow_completion/workflow_completion.rb +30 -0
- data/lib/temporalio/internal/bridge/api.rb +3 -0
- data/lib/temporalio/internal/bridge/client.rb +95 -0
- data/lib/temporalio/internal/bridge/runtime.rb +53 -0
- data/lib/temporalio/internal/bridge/temporalio_bridge.bundle +0 -0
- data/lib/temporalio/internal/bridge/testing.rb +66 -0
- data/lib/temporalio/internal/bridge/worker.rb +85 -0
- data/lib/temporalio/internal/bridge.rb +36 -0
- data/lib/temporalio/internal/client/implementation.rb +700 -0
- data/lib/temporalio/internal/metric.rb +122 -0
- data/lib/temporalio/internal/proto_utils.rb +133 -0
- data/lib/temporalio/internal/worker/activity_worker.rb +376 -0
- data/lib/temporalio/internal/worker/multi_runner.rb +213 -0
- data/lib/temporalio/internal/worker/workflow_instance/child_workflow_handle.rb +54 -0
- data/lib/temporalio/internal/worker/workflow_instance/context.rb +333 -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 +236 -0
- data/lib/temporalio/internal.rb +7 -0
- data/lib/temporalio/metric.rb +109 -0
- data/lib/temporalio/retry_policy.rb +74 -0
- data/lib/temporalio/runtime.rb +314 -0
- data/lib/temporalio/scoped_logger.rb +96 -0
- data/lib/temporalio/search_attributes.rb +343 -0
- data/lib/temporalio/testing/activity_environment.rb +136 -0
- data/lib/temporalio/testing/workflow_environment.rb +383 -0
- data/lib/temporalio/testing.rb +10 -0
- data/lib/temporalio/version.rb +5 -0
- data/lib/temporalio/worker/activity_executor/fiber.rb +49 -0
- data/lib/temporalio/worker/activity_executor/thread_pool.rb +46 -0
- data/lib/temporalio/worker/activity_executor.rb +55 -0
- data/lib/temporalio/worker/interceptor.rb +362 -0
- data/lib/temporalio/worker/thread_pool.rb +237 -0
- data/lib/temporalio/worker/tuner.rb +189 -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/workflow_replayer.rb +343 -0
- data/lib/temporalio/worker.rb +569 -0
- 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 +529 -0
- data/lib/temporalio/workflow_history.rb +47 -0
- data/lib/temporalio.rb +11 -0
- data/temporalio.gemspec +28 -0
- metadata +236 -0
@@ -0,0 +1,151 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'temporalio/workflow'
|
4
|
+
|
5
|
+
module Temporalio
|
6
|
+
module Workflow
|
7
|
+
# Asynchronous future for use in workflows to do concurrent and background work. This can only be used inside
|
8
|
+
# workflows.
|
9
|
+
class Future
|
10
|
+
# Return a future that completes when any of the given futures complete. The returned future will return the first
|
11
|
+
# completed futures value or raise the first completed futures exception. To not raise the exception, see
|
12
|
+
# {try_any_of}.
|
13
|
+
#
|
14
|
+
# @param futures [Array<Future<Object>>] Futures to wait for the first to complete.
|
15
|
+
# @return [Future<Object>] Future that relays the first completed future's result/failure.
|
16
|
+
def self.any_of(*futures)
|
17
|
+
Future.new do
|
18
|
+
Workflow.wait_condition(cancellation: nil) { futures.any?(&:done?) }
|
19
|
+
# We know a future is always returned from find, the & just helps type checker
|
20
|
+
(futures.find(&:done?) || raise).wait
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
# Return a future that completes when all of the given futures complete or any future fails. The returned future
|
25
|
+
# will return nil on success or raise an exception if any of the futures failed. This means if any future fails,
|
26
|
+
# this will not wait for the other futures to complete. To wait for all futures to complete no matter what, see
|
27
|
+
# {try_all_of}.
|
28
|
+
#
|
29
|
+
# @param futures [Array<Future<Object>>] Futures to wait for all to complete (or first to fail).
|
30
|
+
# @return [Future<nil>] Future that completes successfully with nil when all futures complete, or raises on first
|
31
|
+
# future failure.
|
32
|
+
def self.all_of(*futures)
|
33
|
+
Future.new do
|
34
|
+
Workflow.wait_condition(cancellation: nil) { futures.all?(&:done?) || futures.any?(&:failure?) }
|
35
|
+
# Raise on error if any
|
36
|
+
futures.find(&:failure?)&.wait
|
37
|
+
nil
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
# Return a future that completes when the first future completes. The result of the future is the future from the
|
42
|
+
# list that completed first. The future returned will never raise even if the first completed future fails.
|
43
|
+
#
|
44
|
+
# @param futures [Array<Future<Object>>] Futures to wait for the first to complete.
|
45
|
+
# @return [Future<Future<Object>>] Future with the first completing future regardless of success/fail.
|
46
|
+
def self.try_any_of(*futures)
|
47
|
+
Future.new do
|
48
|
+
Workflow.wait_condition(cancellation: nil) { futures.any?(&:done?) }
|
49
|
+
futures.find(&:done?) || raise
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
# Return a future that completes when all of the given futures complete regardless of success/fail. The returned
|
54
|
+
# future will return nil when all futures are complete.
|
55
|
+
#
|
56
|
+
# @param futures [Array<Future<Object>>] Futures to wait for all to complete (regardless of success/fail).
|
57
|
+
# @return [Future<nil>] Future that completes successfully with nil when all futures complete.
|
58
|
+
def self.try_all_of(*futures)
|
59
|
+
Future.new do
|
60
|
+
Workflow.wait_condition(cancellation: nil) { futures.all?(&:done?) }
|
61
|
+
nil
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
# @return [Object, nil] Result if the future is done or nil if it is not. This will return nil if the result is
|
66
|
+
# nil too. Users can use {done?} to differentiate the situations.
|
67
|
+
attr_reader :result
|
68
|
+
|
69
|
+
# @return [Exception, nil] Failure if this future failed or nil if it didn't or hasn't yet completed.
|
70
|
+
attr_reader :failure
|
71
|
+
|
72
|
+
# Create a new future. If created with a block, the block is started in the background and its success/raise is
|
73
|
+
# the result of the future. If created without a block, the result or failure can be set on it.
|
74
|
+
def initialize(&block)
|
75
|
+
@done = false
|
76
|
+
@result = nil
|
77
|
+
@failure = nil
|
78
|
+
@block_given = block_given?
|
79
|
+
return unless block_given?
|
80
|
+
|
81
|
+
@fiber = Fiber.schedule do
|
82
|
+
@result = block.call # steep:ignore
|
83
|
+
rescue Exception => e # rubocop:disable Lint/RescueException
|
84
|
+
@failure = e
|
85
|
+
ensure
|
86
|
+
@done = true
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
# @return [Boolean] True if the future is done, false otherwise.
|
91
|
+
def done?
|
92
|
+
@done
|
93
|
+
end
|
94
|
+
|
95
|
+
# @return [Boolean] True if done and not a failure, false if still running or failed.
|
96
|
+
def result?
|
97
|
+
done? && !failure
|
98
|
+
end
|
99
|
+
|
100
|
+
# Mark the future as done and set the result. Does nothing if the future is already done. This cannot be invoked
|
101
|
+
# if the future was constructed with a block.
|
102
|
+
#
|
103
|
+
# @param result [Object] The result, which can be nil.
|
104
|
+
def result=(result)
|
105
|
+
Kernel.raise 'Cannot set result if block given in constructor' if @block_given
|
106
|
+
return if done?
|
107
|
+
|
108
|
+
@result = result
|
109
|
+
@done = true
|
110
|
+
end
|
111
|
+
|
112
|
+
# @return [Boolean] True if done and failed, false if still running or succeeded.
|
113
|
+
def failure?
|
114
|
+
done? && !failure.nil?
|
115
|
+
end
|
116
|
+
|
117
|
+
# Mark the future as done and set the failure. Does nothing if the future is already done. This cannot be invoked
|
118
|
+
# if the future was constructed with a block.
|
119
|
+
#
|
120
|
+
# @param failure [Exception] The failure.
|
121
|
+
def failure=(failure)
|
122
|
+
Kernel.raise 'Cannot set result if block given in constructor' if @block_given
|
123
|
+
Kernel.raise 'Cannot set nil failure' if failure.nil?
|
124
|
+
return if done?
|
125
|
+
|
126
|
+
@failure = failure
|
127
|
+
@done = true
|
128
|
+
end
|
129
|
+
|
130
|
+
# Wait on the future to complete. This will return the success or raise the failure. To not raise, use
|
131
|
+
# {wait_no_raise}.
|
132
|
+
#
|
133
|
+
# @return [Object] Result on success.
|
134
|
+
# @raise [Exception] Failure if occurred.
|
135
|
+
def wait
|
136
|
+
Workflow.wait_condition(cancellation: nil) { done? }
|
137
|
+
Kernel.raise failure if failure? # steep:ignore
|
138
|
+
|
139
|
+
result #: untyped
|
140
|
+
end
|
141
|
+
|
142
|
+
# Wait on the future to complete. This will return the success or nil if it failed, this will not raise.
|
143
|
+
#
|
144
|
+
# @return [Object, nil] Result on success or nil on failure.
|
145
|
+
def wait_no_raise
|
146
|
+
Workflow.wait_condition(cancellation: nil) { done? }
|
147
|
+
result
|
148
|
+
end
|
149
|
+
end
|
150
|
+
end
|
151
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Temporalio
|
4
|
+
module Workflow
|
5
|
+
# Actions taken if a workflow completes with running handlers.
|
6
|
+
module HandlerUnfinishedPolicy
|
7
|
+
# Issue a warning in addition to abandoning.
|
8
|
+
WARN_AND_ABANDON = 1
|
9
|
+
# Abandon the handler with no warning.
|
10
|
+
ABANDON = 2
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,82 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Temporalio
|
4
|
+
module Workflow
|
5
|
+
Info = Struct.new(
|
6
|
+
:attempt,
|
7
|
+
:continued_run_id,
|
8
|
+
:cron_schedule,
|
9
|
+
:execution_timeout,
|
10
|
+
:last_failure,
|
11
|
+
:last_result,
|
12
|
+
:namespace,
|
13
|
+
:parent,
|
14
|
+
:retry_policy,
|
15
|
+
:run_id,
|
16
|
+
:run_timeout,
|
17
|
+
:start_time,
|
18
|
+
:task_queue,
|
19
|
+
:task_timeout,
|
20
|
+
:workflow_id,
|
21
|
+
:workflow_type,
|
22
|
+
keyword_init: true
|
23
|
+
)
|
24
|
+
|
25
|
+
# Information about the running workflow. This is immutable for the life of the workflow run.
|
26
|
+
#
|
27
|
+
# @!attribute attempt
|
28
|
+
# @return [Integer] Current workflow attempt.
|
29
|
+
# @!attribute continued_run_id
|
30
|
+
# @return [String, nil] Run ID if this was continued.
|
31
|
+
# @!attribute cron_schedule
|
32
|
+
# @return [String, nil] Cron schedule if applicable.
|
33
|
+
# @!attribute execution_timeout
|
34
|
+
# @return [Float, nil] Execution timeout for the workflow.
|
35
|
+
# @!attribute last_failure
|
36
|
+
# @return [Exception, nil] Failure if this workflow run is a continuation of a failure.
|
37
|
+
# @!attribute last_result
|
38
|
+
# @return [Object, nil] Successful result if this workflow is a continuation of a success.
|
39
|
+
# @!attribute namespace
|
40
|
+
# @return [String] Namespace for the workflow.
|
41
|
+
# @!attribute parent
|
42
|
+
# @return [ParentInfo, nil] Parent information for the workflow if this is a child.
|
43
|
+
# @!attribute retry_policy
|
44
|
+
# @return [RetryPolicy, nil] Retry policy for the workflow.
|
45
|
+
# @!attribute run_id
|
46
|
+
# @return [String] Run ID for the workflow.
|
47
|
+
# @!attribute run_timeout
|
48
|
+
# @return [Float, nil] Run timeout for the workflow.
|
49
|
+
# @!attribute start_time
|
50
|
+
# @return [Time] Time when the workflow started.
|
51
|
+
# @!attribute task_queue
|
52
|
+
# @return [String] Task queue for the workflow.
|
53
|
+
# @!attribute task_timeout
|
54
|
+
# @return [Float] Task timeout for the workflow.
|
55
|
+
# @!attribute workflow_id
|
56
|
+
# @return [String] ID for the workflow.
|
57
|
+
# @!attribute workflow_type
|
58
|
+
# @return [String] Workflow type name.
|
59
|
+
#
|
60
|
+
# @note WARNING: This class may have required parameters added to its constructor. Users should not instantiate this
|
61
|
+
# class or it may break in incompatible ways.
|
62
|
+
class Info
|
63
|
+
# Information about a parent of a workflow.
|
64
|
+
#
|
65
|
+
# @!attribute namespace
|
66
|
+
# @return [String] Namespace for the parent.
|
67
|
+
# @!attribute run_id
|
68
|
+
# @return [String] Run ID for the parent.
|
69
|
+
# @!attribute workflow_id
|
70
|
+
# @return [String] Workflow ID for the parent.
|
71
|
+
#
|
72
|
+
# @note WARNING: This class may have required parameters added to its constructor. Users should not instantiate
|
73
|
+
# this class or it may break in incompatible ways.
|
74
|
+
ParentInfo = Struct.new(
|
75
|
+
:namespace,
|
76
|
+
:run_id,
|
77
|
+
:workflow_id,
|
78
|
+
keyword_init: true
|
79
|
+
)
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'temporalio/internal/bridge/api'
|
4
|
+
|
5
|
+
module Temporalio
|
6
|
+
module Workflow
|
7
|
+
# How a child workflow should be handled when the parent closes.
|
8
|
+
module ParentClosePolicy
|
9
|
+
# Unset.
|
10
|
+
UNSPECIFIED = Internal::Bridge::Api::ChildWorkflow::ParentClosePolicy::PARENT_CLOSE_POLICY_UNSPECIFIED
|
11
|
+
# The child workflow will also terminate.
|
12
|
+
TERMINATE = Internal::Bridge::Api::ChildWorkflow::ParentClosePolicy::PARENT_CLOSE_POLICY_TERMINATE
|
13
|
+
# The child workflow will do nothing.
|
14
|
+
ABANDON = Internal::Bridge::Api::ChildWorkflow::ParentClosePolicy::PARENT_CLOSE_POLICY_ABANDON
|
15
|
+
# Cancellation will be requested of the child workflow.
|
16
|
+
REQUEST_CANCEL = Internal::Bridge::Api::ChildWorkflow::ParentClosePolicy::PARENT_CLOSE_POLICY_REQUEST_CANCEL
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Temporalio
|
4
|
+
module Workflow
|
5
|
+
# Information about a workflow update
|
6
|
+
#
|
7
|
+
# @!attribute id
|
8
|
+
# @return [String] Update ID.
|
9
|
+
# @!attribute name
|
10
|
+
# @return [String] Update name.
|
11
|
+
#
|
12
|
+
# @note WARNING: This class may have required parameters added to its constructor. Users should not instantiate this
|
13
|
+
# class or it may break in incompatible ways.
|
14
|
+
UpdateInfo = Struct.new(
|
15
|
+
:id,
|
16
|
+
:name,
|
17
|
+
keyword_init: true
|
18
|
+
)
|
19
|
+
end
|
20
|
+
end
|