temporal-ruby 0.0.1.pre.pre1 → 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -0
- data/README.md +23 -3
- data/lib/gen/temporal/api/command/v1/message_pb.rb +1 -1
- data/lib/gen/temporal/api/enums/v1/common_pb.rb +7 -0
- data/lib/gen/temporal/api/errordetails/v1/message_pb.rb +5 -6
- data/lib/gen/temporal/api/version/v1/message_pb.rb +19 -8
- data/lib/gen/temporal/api/workflowservice/v1/request_response_pb.rb +19 -8
- data/lib/gen/temporal/api/workflowservice/v1/service_services_pb.rb +0 -3
- data/lib/temporal.rb +104 -0
- data/lib/temporal/activity/context.rb +5 -1
- data/lib/temporal/activity/poller.rb +26 -9
- data/lib/temporal/activity/task_processor.rb +33 -20
- data/lib/temporal/client/converter/base.rb +35 -0
- data/lib/temporal/client/converter/composite.rb +49 -0
- data/lib/temporal/client/converter/payload/bytes.rb +30 -0
- data/lib/temporal/client/converter/payload/json.rb +28 -0
- data/lib/temporal/client/converter/payload/nil.rb +27 -0
- data/lib/temporal/client/grpc_client.rb +102 -27
- data/lib/temporal/client/retryer.rb +49 -0
- data/lib/temporal/client/serializer.rb +2 -0
- data/lib/temporal/client/serializer/cancel_timer.rb +2 -2
- data/lib/temporal/client/serializer/complete_workflow.rb +6 -4
- data/lib/temporal/client/serializer/continue_as_new.rb +37 -0
- data/lib/temporal/client/serializer/fail_workflow.rb +2 -2
- data/lib/temporal/client/serializer/failure.rb +4 -2
- data/lib/temporal/client/serializer/record_marker.rb +6 -4
- data/lib/temporal/client/serializer/request_activity_cancellation.rb +2 -2
- data/lib/temporal/client/serializer/retry_policy.rb +24 -0
- data/lib/temporal/client/serializer/schedule_activity.rb +8 -20
- data/lib/temporal/client/serializer/start_child_workflow.rb +9 -20
- data/lib/temporal/client/serializer/start_timer.rb +2 -2
- data/lib/temporal/concerns/payloads.rb +51 -0
- data/lib/temporal/configuration.rb +31 -4
- data/lib/temporal/error_handler.rb +11 -0
- data/lib/temporal/errors.rb +24 -0
- data/lib/temporal/execution_options.rb +9 -1
- data/lib/temporal/json.rb +3 -1
- data/lib/temporal/logger.rb +17 -0
- data/lib/temporal/metadata.rb +11 -3
- data/lib/temporal/metadata/activity.rb +15 -2
- data/lib/temporal/metadata/workflow.rb +8 -0
- data/lib/temporal/metadata/workflow_task.rb +11 -0
- data/lib/temporal/retry_policy.rb +6 -9
- data/lib/temporal/saga/concern.rb +1 -1
- data/lib/temporal/testing.rb +1 -0
- data/lib/temporal/testing/future_registry.rb +1 -1
- data/lib/temporal/testing/local_activity_context.rb +1 -1
- data/lib/temporal/testing/local_workflow_context.rb +38 -14
- data/lib/temporal/testing/scheduled_workflows.rb +75 -0
- data/lib/temporal/testing/temporal_override.rb +35 -7
- data/lib/temporal/testing/workflow_override.rb +6 -1
- data/lib/temporal/version.rb +1 -1
- data/lib/temporal/worker.rb +28 -10
- data/lib/temporal/workflow.rb +8 -2
- data/lib/temporal/workflow/command.rb +3 -0
- data/lib/temporal/workflow/context.rb +40 -5
- data/lib/temporal/workflow/errors.rb +39 -0
- data/lib/temporal/workflow/executor.rb +1 -1
- data/lib/temporal/workflow/future.rb +18 -6
- data/lib/temporal/workflow/history/event.rb +1 -3
- data/lib/temporal/workflow/history/event_target.rb +4 -0
- data/lib/temporal/workflow/history/window.rb +1 -1
- data/lib/temporal/workflow/poller.rb +41 -13
- data/lib/temporal/workflow/replay_aware_logger.rb +4 -4
- data/lib/temporal/workflow/state_manager.rb +33 -52
- data/lib/temporal/workflow/task_processor.rb +41 -11
- metadata +21 -9
- data/lib/temporal/client/serializer/payload.rb +0 -25
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: temporal-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.1
|
4
|
+
version: 0.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anthony Dmitriyev
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: grpc
|
@@ -136,27 +136,37 @@ files:
|
|
136
136
|
- lib/temporal/activity/task_processor.rb
|
137
137
|
- lib/temporal/activity/workflow_convenience_methods.rb
|
138
138
|
- lib/temporal/client.rb
|
139
|
+
- lib/temporal/client/converter/base.rb
|
140
|
+
- lib/temporal/client/converter/composite.rb
|
141
|
+
- lib/temporal/client/converter/payload/bytes.rb
|
142
|
+
- lib/temporal/client/converter/payload/json.rb
|
143
|
+
- lib/temporal/client/converter/payload/nil.rb
|
139
144
|
- lib/temporal/client/errors.rb
|
140
145
|
- lib/temporal/client/grpc_client.rb
|
146
|
+
- lib/temporal/client/retryer.rb
|
141
147
|
- lib/temporal/client/serializer.rb
|
142
148
|
- lib/temporal/client/serializer/base.rb
|
143
149
|
- lib/temporal/client/serializer/cancel_timer.rb
|
144
150
|
- lib/temporal/client/serializer/complete_workflow.rb
|
151
|
+
- lib/temporal/client/serializer/continue_as_new.rb
|
145
152
|
- lib/temporal/client/serializer/fail_workflow.rb
|
146
153
|
- lib/temporal/client/serializer/failure.rb
|
147
|
-
- lib/temporal/client/serializer/payload.rb
|
148
154
|
- lib/temporal/client/serializer/record_marker.rb
|
149
155
|
- lib/temporal/client/serializer/request_activity_cancellation.rb
|
156
|
+
- lib/temporal/client/serializer/retry_policy.rb
|
150
157
|
- lib/temporal/client/serializer/schedule_activity.rb
|
151
158
|
- lib/temporal/client/serializer/start_child_workflow.rb
|
152
159
|
- lib/temporal/client/serializer/start_timer.rb
|
153
160
|
- lib/temporal/concerns/executable.rb
|
161
|
+
- lib/temporal/concerns/payloads.rb
|
154
162
|
- lib/temporal/concerns/typed.rb
|
155
163
|
- lib/temporal/configuration.rb
|
164
|
+
- lib/temporal/error_handler.rb
|
156
165
|
- lib/temporal/errors.rb
|
157
166
|
- lib/temporal/executable_lookup.rb
|
158
167
|
- lib/temporal/execution_options.rb
|
159
168
|
- lib/temporal/json.rb
|
169
|
+
- lib/temporal/logger.rb
|
160
170
|
- lib/temporal/metadata.rb
|
161
171
|
- lib/temporal/metadata/activity.rb
|
162
172
|
- lib/temporal/metadata/base.rb
|
@@ -175,6 +185,7 @@ files:
|
|
175
185
|
- lib/temporal/testing/future_registry.rb
|
176
186
|
- lib/temporal/testing/local_activity_context.rb
|
177
187
|
- lib/temporal/testing/local_workflow_context.rb
|
188
|
+
- lib/temporal/testing/scheduled_workflows.rb
|
178
189
|
- lib/temporal/testing/temporal_override.rb
|
179
190
|
- lib/temporal/testing/workflow_execution.rb
|
180
191
|
- lib/temporal/testing/workflow_override.rb
|
@@ -190,6 +201,7 @@ files:
|
|
190
201
|
- lib/temporal/workflow/context.rb
|
191
202
|
- lib/temporal/workflow/convenience_methods.rb
|
192
203
|
- lib/temporal/workflow/dispatcher.rb
|
204
|
+
- lib/temporal/workflow/errors.rb
|
193
205
|
- lib/temporal/workflow/execution_info.rb
|
194
206
|
- lib/temporal/workflow/executor.rb
|
195
207
|
- lib/temporal/workflow/future.rb
|
@@ -207,7 +219,7 @@ homepage: https://github.com/coinbase/temporal-ruby
|
|
207
219
|
licenses:
|
208
220
|
- Apache-2.0
|
209
221
|
metadata: {}
|
210
|
-
post_install_message:
|
222
|
+
post_install_message:
|
211
223
|
rdoc_options: []
|
212
224
|
require_paths:
|
213
225
|
- lib
|
@@ -218,12 +230,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
218
230
|
version: '0'
|
219
231
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
220
232
|
requirements:
|
221
|
-
- - "
|
233
|
+
- - ">="
|
222
234
|
- !ruby/object:Gem::Version
|
223
|
-
version:
|
235
|
+
version: '0'
|
224
236
|
requirements: []
|
225
|
-
rubygems_version: 3.
|
226
|
-
signing_key:
|
237
|
+
rubygems_version: 3.2.15
|
238
|
+
signing_key:
|
227
239
|
specification_version: 4
|
228
240
|
summary: Temporal Ruby client
|
229
241
|
test_files: []
|
@@ -1,25 +0,0 @@
|
|
1
|
-
require 'temporal/client/serializer/base'
|
2
|
-
require 'temporal/json'
|
3
|
-
|
4
|
-
module Temporal
|
5
|
-
module Client
|
6
|
-
module Serializer
|
7
|
-
class Payload < Base
|
8
|
-
JSON_ENCODING = 'json/plain'.freeze
|
9
|
-
|
10
|
-
def to_proto
|
11
|
-
return if object.nil?
|
12
|
-
|
13
|
-
Temporal::Api::Common::V1::Payloads.new(
|
14
|
-
payloads: [
|
15
|
-
Temporal::Api::Common::V1::Payload.new(
|
16
|
-
metadata: { 'encoding' => JSON_ENCODING },
|
17
|
-
data: JSON.serialize(object)
|
18
|
-
)
|
19
|
-
]
|
20
|
-
)
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|