temporalio 1.5.0 → 1.6.0
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/Cargo.lock +1461 -621
- data/Cargo.toml +1 -1
- data/Gemfile +6 -5
- data/README.md +42 -1
- data/ext/Cargo.toml +9 -3
- data/lib/temporalio/api/activity/v1/message.rb +1 -1
- data/lib/temporalio/api/cloud/billing/v1/message.rb +2 -1
- data/lib/temporalio/api/cloud/cloudservice/v1/request_response.rb +17 -1
- data/lib/temporalio/api/cloud/cloudservice/v1/service.rb +1 -1
- data/lib/temporalio/api/cloud/connectivityrule/v1/message.rb +1 -1
- data/lib/temporalio/api/cloud/identity/v1/message.rb +8 -1
- data/lib/temporalio/api/cloud/namespace/v1/message.rb +5 -1
- data/lib/temporalio/api/command/v1/message.rb +2 -1
- data/lib/temporalio/api/common/v1/message.rb +5 -1
- data/lib/temporalio/api/deployment/v1/message.rb +3 -1
- data/lib/temporalio/api/history/v1/message.rb +3 -1
- data/lib/temporalio/api/namespace/v1/message.rb +1 -1
- data/lib/temporalio/api/nexus/v1/message.rb +1 -1
- data/lib/temporalio/api/nexusannotations/v1/options.rb +20 -0
- data/lib/temporalio/api/payload_visitor.rb +32 -0
- data/lib/temporalio/api/schedule/v1/message.rb +1 -1
- data/lib/temporalio/api/sdk/v1/event_group_marker.rb +26 -0
- data/lib/temporalio/api/update/v1/message.rb +1 -1
- data/lib/temporalio/api/workflow/v1/message.rb +3 -2
- data/lib/temporalio/api/workflowservice/v1/request_response.rb +11 -1
- data/lib/temporalio/api/workflowservice/v1/service.rb +3 -2
- data/lib/temporalio/client/connection/cloud_service.rb +120 -0
- data/lib/temporalio/client/connection/workflow_service.rb +75 -0
- data/lib/temporalio/client/connection.rb +37 -2
- data/lib/temporalio/client.rb +10 -5
- data/lib/temporalio/internal/bridge/api/workflow_commands/workflow_commands.rb +1 -1
- data/lib/temporalio/internal/bridge/client.rb +6 -1
- data/lib/temporalio/internal/bridge.rb +20 -0
- data/lib/temporalio/internal/google_protobuf.rb +11 -0
- data/lib/temporalio/internal/worker/workflow_instance/context.rb +2 -0
- data/lib/temporalio/internal/worker/workflow_instance/details.rb +3 -1
- data/lib/temporalio/internal/worker/workflow_instance/scheduler.rb +73 -2
- data/lib/temporalio/internal/worker/workflow_instance.rb +36 -6
- data/lib/temporalio/internal/worker/workflow_worker.rb +10 -2
- data/lib/temporalio/internal/workflow_task_failure_error.rb +9 -0
- data/lib/temporalio/version.rb +1 -1
- data/lib/temporalio/worker/activity_executor/fiber.rb +1 -1
- data/lib/temporalio/worker/activity_executor/thread_pool.rb +1 -1
- data/lib/temporalio/worker/illegal_workflow_call_validator.rb +3 -1
- data/lib/temporalio/worker/workflow_executor/thread_pool.rb +5 -1
- data/lib/temporalio/worker/workflow_replayer.rb +17 -4
- data/lib/temporalio/worker.rb +30 -5
- data/lib/temporalio/workflow/future.rb +5 -0
- data/lib/temporalio/workflow/nexus_operation_cancellation_type.rb +4 -2
- data/lib/temporalio/workflow.rb +8 -0
- data/rbi/google/protobuf.rbi +25 -0
- data/rbi/temporalio/activity/cancellation_details.rbi +33 -0
- data/rbi/temporalio/activity/complete_async_error.rbi +3 -0
- data/rbi/temporalio/activity/context.rbi +42 -0
- data/rbi/temporalio/activity/definition.rbi +74 -0
- data/rbi/temporalio/activity/info.rbi +112 -0
- data/rbi/temporalio/activity.rbi +3 -0
- data/rbi/temporalio/api/activity/v1/message.rbi +1453 -0
- data/rbi/temporalio/api/batch/v1/message.rbi +1283 -0
- data/rbi/temporalio/api/callback/v1/message.rbi +188 -0
- data/rbi/temporalio/api/cloud/account/v1/message.rbi +650 -0
- data/rbi/temporalio/api/cloud/auditlog/v1/message.rbi +318 -0
- data/rbi/temporalio/api/cloud/billing/v1/message.rbi +480 -0
- data/rbi/temporalio/api/cloud/cloudservice/v1/request_response.rbi +12454 -0
- data/rbi/temporalio/api/cloud/cloudservice/v1/service.rbi +3 -0
- data/rbi/temporalio/api/cloud/cloudservice/v1/service_services.rbi +709 -0
- data/rbi/temporalio/api/cloud/cloudservice.rbi +5 -0
- data/rbi/temporalio/api/cloud/connectivityrule/v1/message.rbi +403 -0
- data/rbi/temporalio/api/cloud/identity/v1/message.rbi +3072 -0
- data/rbi/temporalio/api/cloud/namespace/v1/message.rbi +3659 -0
- data/rbi/temporalio/api/cloud/nexus/v1/message.rbi +595 -0
- data/rbi/temporalio/api/cloud/operation/v1/message.rbi +244 -0
- data/rbi/temporalio/api/cloud/region/v1/message.rbi +166 -0
- data/rbi/temporalio/api/cloud/resource/v1/message.rbi +29 -0
- data/rbi/temporalio/api/cloud/sink/v1/message.rbi +438 -0
- data/rbi/temporalio/api/cloud/usage/v1/message.rbi +409 -0
- data/rbi/temporalio/api/command/v1/message.rbi +2655 -0
- data/rbi/temporalio/api/common/v1/grpc_status.rbi +92 -0
- data/rbi/temporalio/api/common/v1/message.rbi +2983 -0
- data/rbi/temporalio/api/compute/v1/config.rbi +421 -0
- data/rbi/temporalio/api/compute/v1/provider.rbi +125 -0
- data/rbi/temporalio/api/compute/v1/scaler.rbi +102 -0
- data/rbi/temporalio/api/deployment/v1/message.rbi +2340 -0
- data/rbi/temporalio/api/enums/v1/activity.rbi +62 -0
- data/rbi/temporalio/api/enums/v1/batch_operation.rbi +47 -0
- data/rbi/temporalio/api/enums/v1/command_type.rbi +36 -0
- data/rbi/temporalio/api/enums/v1/common.rbi +181 -0
- data/rbi/temporalio/api/enums/v1/deployment.rbi +80 -0
- data/rbi/temporalio/api/enums/v1/event_type.rbi +79 -0
- data/rbi/temporalio/api/enums/v1/failed_cause.rbi +155 -0
- data/rbi/temporalio/api/enums/v1/namespace.rbi +58 -0
- data/rbi/temporalio/api/enums/v1/nexus.rbi +98 -0
- data/rbi/temporalio/api/enums/v1/query.rbi +40 -0
- data/rbi/temporalio/api/enums/v1/reset.rbi +60 -0
- data/rbi/temporalio/api/enums/v1/schedule.rbi +25 -0
- data/rbi/temporalio/api/enums/v1/task_queue.rbi +134 -0
- data/rbi/temporalio/api/enums/v1/update.rbi +39 -0
- data/rbi/temporalio/api/enums/v1/workflow.rbi +259 -0
- data/rbi/temporalio/api/errordetails/v1/message.rbi +1389 -0
- data/rbi/temporalio/api/export/v1/message.rbi +123 -0
- data/rbi/temporalio/api/failure/v1/message.rbi +1303 -0
- data/rbi/temporalio/api/filter/v1/message.rbi +267 -0
- data/rbi/temporalio/api/history/v1/message.rbi +10737 -0
- data/rbi/temporalio/api/namespace/v1/message.rbi +1044 -0
- data/rbi/temporalio/api/nexus/v1/message.rbi +2780 -0
- data/rbi/temporalio/api/nexusannotations/v1/options.rbi +161 -0
- data/rbi/temporalio/api/nexusservices/workerservice/v1/request_response.rbi +124 -0
- data/rbi/temporalio/api/operatorservice/v1/request_response.rbi +1836 -0
- data/rbi/temporalio/api/operatorservice/v1/service.rbi +3 -0
- data/rbi/temporalio/api/operatorservice/v1/service_services.rbi +143 -0
- data/rbi/temporalio/api/operatorservice.rbi +5 -0
- data/rbi/temporalio/api/payload_visitor.rbi +876 -0
- data/rbi/temporalio/api/protoc_gen_openapiv2/options/annotations.rbi +3 -0
- data/rbi/temporalio/api/protoc_gen_openapiv2/options/openapiv2.rbi +3482 -0
- data/rbi/temporalio/api/protocol/v1/message.rbi +139 -0
- data/rbi/temporalio/api/protometa/v1/annotations.rbi +97 -0
- data/rbi/temporalio/api/query/v1/message.rbi +288 -0
- data/rbi/temporalio/api/replication/v1/message.rbi +226 -0
- data/rbi/temporalio/api/rules/v1/message.rbi +492 -0
- data/rbi/temporalio/api/schedule/v1/message.rbi +2377 -0
- data/rbi/temporalio/api/sdk/v1/enhanced_stack_trace.rbi +478 -0
- data/rbi/temporalio/api/sdk/v1/event_group_marker.rbi +337 -0
- data/rbi/temporalio/api/sdk/v1/external_storage.rbi +85 -0
- data/rbi/temporalio/api/sdk/v1/task_complete_metadata.rbi +206 -0
- data/rbi/temporalio/api/sdk/v1/user_metadata.rbi +98 -0
- data/rbi/temporalio/api/sdk/v1/worker_config.rbi +255 -0
- data/rbi/temporalio/api/sdk/v1/workflow_metadata.rbi +297 -0
- data/rbi/temporalio/api/taskqueue/v1/message.rbi +2460 -0
- data/rbi/temporalio/api/testservice/v1/request_response.rbi +380 -0
- data/rbi/temporalio/api/testservice/v1/service.rbi +3 -0
- data/rbi/temporalio/api/testservice/v1/service_services.rbi +100 -0
- data/rbi/temporalio/api/update/v1/message.rbi +800 -0
- data/rbi/temporalio/api/version/v1/message.rbi +281 -0
- data/rbi/temporalio/api/worker/v1/message.rbi +1565 -0
- data/rbi/temporalio/api/workflow/v1/message.rbi +5011 -0
- data/rbi/temporalio/api/workflowservice/v1/request_response.rbi +30477 -0
- data/rbi/temporalio/api/workflowservice/v1/service.rbi +3 -0
- data/rbi/temporalio/api/workflowservice/v1/service_services.rbi +1571 -0
- data/rbi/temporalio/api/workflowservice.rbi +5 -0
- data/rbi/temporalio/api.rbi +7 -0
- data/rbi/temporalio/cancellation.rbi +40 -0
- data/rbi/temporalio/client/activity_execution.rbi +134 -0
- data/rbi/temporalio/client/activity_execution_count.rbi +23 -0
- data/rbi/temporalio/client/activity_execution_status.rbi +11 -0
- data/rbi/temporalio/client/activity_handle.rbi +49 -0
- data/rbi/temporalio/client/activity_id_reference.rbi +24 -0
- data/rbi/temporalio/client/async_activity_handle.rbi +49 -0
- data/rbi/temporalio/client/connection/cloud_service.rbi +239 -0
- data/rbi/temporalio/client/connection/operator_service.rbi +47 -0
- data/rbi/temporalio/client/connection/service.rbi +19 -0
- data/rbi/temporalio/client/connection/test_service.rbi +29 -0
- data/rbi/temporalio/client/connection/workflow_service.rbi +377 -0
- data/rbi/temporalio/client/connection.rbi +284 -0
- data/rbi/temporalio/client/interceptor.rbi +1067 -0
- data/rbi/temporalio/client/pending_activity_state.rbi +9 -0
- data/rbi/temporalio/client/plugin.rbi +17 -0
- data/rbi/temporalio/client/schedule.rbi +677 -0
- data/rbi/temporalio/client/schedule_handle.rbi +40 -0
- data/rbi/temporalio/client/with_start_workflow_operation.rbi +126 -0
- data/rbi/temporalio/client/workflow_execution.rbi +62 -0
- data/rbi/temporalio/client/workflow_execution_count.rbi +23 -0
- data/rbi/temporalio/client/workflow_execution_status.rbi +11 -0
- data/rbi/temporalio/client/workflow_handle.rbi +148 -0
- data/rbi/temporalio/client/workflow_query_reject_condition.rbi +7 -0
- data/rbi/temporalio/client/workflow_update_handle.rbi +38 -0
- data/rbi/temporalio/client/workflow_update_wait_stage.rbi +7 -0
- data/rbi/temporalio/client.rbi +534 -0
- data/rbi/temporalio/common_enums.rbi +45 -0
- data/rbi/temporalio/contrib/open_telemetry.rbi +73 -0
- data/rbi/temporalio/converters/data_converter.rbi +44 -0
- data/rbi/temporalio/converters/failure_converter.rbi +20 -0
- data/rbi/temporalio/converters/payload_codec.rbi +11 -0
- data/rbi/temporalio/converters/payload_converter/binary_null.rbi +5 -0
- data/rbi/temporalio/converters/payload_converter/binary_plain.rbi +5 -0
- data/rbi/temporalio/converters/payload_converter/binary_protobuf.rbi +5 -0
- data/rbi/temporalio/converters/payload_converter/composite.rbi +20 -0
- data/rbi/temporalio/converters/payload_converter/encoding.rbi +14 -0
- data/rbi/temporalio/converters/payload_converter/json_plain.rbi +10 -0
- data/rbi/temporalio/converters/payload_converter/json_protobuf.rbi +5 -0
- data/rbi/temporalio/converters/payload_converter.rbi +28 -0
- data/rbi/temporalio/converters/raw_value.rbi +11 -0
- data/rbi/temporalio/converters.rbi +3 -0
- data/rbi/temporalio/env_config.rbi +156 -0
- data/rbi/temporalio/error/failure.rbi +3 -0
- data/rbi/temporalio/error.rbi +313 -0
- data/rbi/temporalio/internal/bridge/api/activity_result/activity_result.rbi +547 -0
- data/rbi/temporalio/internal/bridge/api/activity_task/activity_task.rbi +705 -0
- data/rbi/temporalio/internal/bridge/api/child_workflow/child_workflow.rbi +332 -0
- data/rbi/temporalio/internal/bridge/api/common/common.rbi +191 -0
- data/rbi/temporalio/internal/bridge/api/core_interface.rbi +567 -0
- data/rbi/temporalio/internal/bridge/api/external_data/external_data.rbi +255 -0
- data/rbi/temporalio/internal/bridge/api/nexus/nexus.rbi +527 -0
- data/rbi/temporalio/internal/bridge/api/workflow_activation/workflow_activation.rbi +2808 -0
- data/rbi/temporalio/internal/bridge/api/workflow_commands/workflow_commands.rbi +3309 -0
- data/rbi/temporalio/internal/bridge/api/workflow_completion/workflow_completion.rbi +272 -0
- data/rbi/temporalio/internal/bridge/api.rbi +3 -0
- data/rbi/temporalio/internal/bridge/client.rbi +346 -0
- data/rbi/temporalio/internal/bridge/runtime.rbi +231 -0
- data/rbi/temporalio/internal/bridge/testing.rbi +109 -0
- data/rbi/temporalio/internal/bridge/worker.rbi +250 -0
- data/rbi/temporalio/internal/bridge.rbi +47 -0
- data/rbi/temporalio/internal/client/implementation.rbi +53 -0
- data/rbi/temporalio/internal/google_protobuf.rbi +8 -0
- data/rbi/temporalio/internal/metric.rbi +55 -0
- data/rbi/temporalio/internal/proto_utils.rbi +148 -0
- data/rbi/temporalio/internal/worker/activity_worker.rbi +108 -0
- data/rbi/temporalio/internal/worker/multi_runner.rbi +175 -0
- data/rbi/temporalio/internal/worker/workflow_instance/child_workflow_handle.rbi +20 -0
- data/rbi/temporalio/internal/worker/workflow_instance/context.rbi +290 -0
- data/rbi/temporalio/internal/worker/workflow_instance/details.rbi +87 -0
- data/rbi/temporalio/internal/worker/workflow_instance/external_workflow_handle.rbi +14 -0
- data/rbi/temporalio/internal/worker/workflow_instance/externally_immutable_hash.rbi +17 -0
- data/rbi/temporalio/internal/worker/workflow_instance/handler_execution.rbi +17 -0
- data/rbi/temporalio/internal/worker/workflow_instance/handler_hash.rbi +24 -0
- data/rbi/temporalio/internal/worker/workflow_instance/illegal_call_tracer.rbi +17 -0
- data/rbi/temporalio/internal/worker/workflow_instance/inbound_implementation.rbi +21 -0
- data/rbi/temporalio/internal/worker/workflow_instance/nexus_client.rbi +47 -0
- data/rbi/temporalio/internal/worker/workflow_instance/nexus_operation_handle.rbi +19 -0
- data/rbi/temporalio/internal/worker/workflow_instance/outbound_implementation.rbi +43 -0
- data/rbi/temporalio/internal/worker/workflow_instance/replay_safe_logger.rbi +11 -0
- data/rbi/temporalio/internal/worker/workflow_instance/replay_safe_metric.rbi +15 -0
- data/rbi/temporalio/internal/worker/workflow_instance/scheduler.rbi +36 -0
- data/rbi/temporalio/internal/worker/workflow_instance.rbi +231 -0
- data/rbi/temporalio/internal/worker/workflow_worker.rbi +199 -0
- data/rbi/temporalio/internal/workflow_task_failure_error.rbi +3 -0
- data/rbi/temporalio/internal.rbi +3 -0
- data/rbi/temporalio/metric.rbi +56 -0
- data/rbi/temporalio/priority.rbi +38 -0
- data/rbi/temporalio/retry_policy.rbi +40 -0
- data/rbi/temporalio/runtime/metric_buffer.rbi +45 -0
- data/rbi/temporalio/runtime.rbi +185 -0
- data/rbi/temporalio/scoped_logger.rbi +50 -0
- data/rbi/temporalio/search_attributes.rbi +94 -0
- data/rbi/temporalio/simple_plugin.rbi +41 -0
- data/rbi/temporalio/testing/activity_environment.rbi +43 -0
- data/rbi/temporalio/testing/workflow_environment.rbi +116 -0
- data/rbi/temporalio/testing.rbi +3 -0
- data/rbi/temporalio/version.rbi +5 -0
- data/rbi/temporalio/versioning_override.rbi +13 -0
- data/rbi/temporalio/worker/activity_executor/fiber.rbi +20 -0
- data/rbi/temporalio/worker/activity_executor/thread_pool.rbi +20 -0
- data/rbi/temporalio/worker/activity_executor.rbi +20 -0
- data/rbi/temporalio/worker/deployment_options.rbi +23 -0
- data/rbi/temporalio/worker/illegal_workflow_call_validator.rbi +33 -0
- data/rbi/temporalio/worker/interceptor.rbi +489 -0
- data/rbi/temporalio/worker/plugin.rbi +49 -0
- data/rbi/temporalio/worker/poller_behavior.rbi +29 -0
- data/rbi/temporalio/worker/thread_pool.rbi +38 -0
- data/rbi/temporalio/worker/tuner.rbi +221 -0
- data/rbi/temporalio/worker/workflow_executor/thread_pool.rbi +15 -0
- data/rbi/temporalio/worker/workflow_executor.rbi +8 -0
- data/rbi/temporalio/worker/workflow_replayer.rbi +152 -0
- data/rbi/temporalio/worker.rbi +258 -0
- data/rbi/temporalio/worker_deployment_version.rbi +29 -0
- data/rbi/temporalio/workflow/activity_cancellation_type.rbi +7 -0
- data/rbi/temporalio/workflow/child_workflow_cancellation_type.rbi +8 -0
- data/rbi/temporalio/workflow/child_workflow_handle.rbi +27 -0
- data/rbi/temporalio/workflow/definition.rbi +305 -0
- data/rbi/temporalio/workflow/external_workflow_handle.rbi +24 -0
- data/rbi/temporalio/workflow/future.rbi +62 -0
- data/rbi/temporalio/workflow/handler_unfinished_policy.rbi +6 -0
- data/rbi/temporalio/workflow/info.rbi +100 -0
- data/rbi/temporalio/workflow/nexus_client.rbi +65 -0
- data/rbi/temporalio/workflow/nexus_operation_cancellation_type.rbi +8 -0
- data/rbi/temporalio/workflow/nexus_operation_handle.rbi +14 -0
- data/rbi/temporalio/workflow/parent_close_policy.rbi +8 -0
- data/rbi/temporalio/workflow/update_info.rbi +14 -0
- data/rbi/temporalio/workflow.rbi +393 -0
- data/rbi/temporalio/workflow_history.rbi +21 -0
- data/rbi/temporalio.rbi +5 -0
- data/sig/common.rbs +1 -0
- data/sig/google/protobuf_compat.rbs +17 -0
- data/sig/open_telemetry.rbs +47 -0
- data/sig/temporalio/activity/cancellation_details.rbs +21 -0
- data/sig/temporalio/activity/complete_async_error.rbs +6 -0
- data/sig/temporalio/activity/context.rbs +26 -0
- data/sig/temporalio/activity/definition.rbs +60 -0
- data/sig/temporalio/activity/info.rbs +57 -0
- data/sig/temporalio/activity.rbs +4 -0
- data/sig/temporalio/api/activity/v1/message.rbs +708 -0
- data/sig/temporalio/api/batch/v1/message.rbs +594 -0
- data/sig/temporalio/api/callback/v1/message.rbs +112 -0
- data/sig/temporalio/api/cloud/account/v1/message.rbs +314 -0
- data/sig/temporalio/api/cloud/auditlog/v1/message.rbs +168 -0
- data/sig/temporalio/api/cloud/billing/v1/message.rbs +279 -0
- data/sig/temporalio/api/cloud/cloudservice/v1/request_response.rbs +4726 -0
- data/sig/temporalio/api/cloud/cloudservice/v1/service.rbs +25 -0
- data/sig/temporalio/api/cloud/cloudservice.rbs +8 -0
- data/sig/temporalio/api/cloud/connectivityrule/v1/message.rbs +191 -0
- data/sig/temporalio/api/cloud/identity/v1/message.rbs +1372 -0
- data/sig/temporalio/api/cloud/namespace/v1/message.rbs +1571 -0
- data/sig/temporalio/api/cloud/nexus/v1/message.rbs +269 -0
- data/sig/temporalio/api/cloud/operation/v1/message.rbs +156 -0
- data/sig/temporalio/api/cloud/region/v1/message.rbs +109 -0
- data/sig/temporalio/api/cloud/resource/v1/message.rbs +61 -0
- data/sig/temporalio/api/cloud/sink/v1/message.rbs +207 -0
- data/sig/temporalio/api/cloud/usage/v1/message.rbs +230 -0
- data/sig/temporalio/api/command/v1/message.rbs +1211 -0
- data/sig/temporalio/api/common/v1/grpc_status.rbs +59 -0
- data/sig/temporalio/api/common/v1/message.rbs +1238 -0
- data/sig/temporalio/api/compute/v1/config.rbs +176 -0
- data/sig/temporalio/api/compute/v1/provider.rbs +73 -0
- data/sig/temporalio/api/compute/v1/scaler.rbs +60 -0
- data/sig/temporalio/api/deployment/v1/message.rbs +1063 -0
- data/sig/temporalio/api/enums/v1/activity.rbs +134 -0
- data/sig/temporalio/api/enums/v1/batch_operation.rbs +80 -0
- data/sig/temporalio/api/enums/v1/command_type.rbs +74 -0
- data/sig/temporalio/api/enums/v1/common.rbs +271 -0
- data/sig/temporalio/api/enums/v1/deployment.rbs +177 -0
- data/sig/temporalio/api/enums/v1/event_type.rbs +263 -0
- data/sig/temporalio/api/enums/v1/failed_cause.rbs +281 -0
- data/sig/temporalio/api/enums/v1/namespace.rbs +87 -0
- data/sig/temporalio/api/enums/v1/nexus.rbs +172 -0
- data/sig/temporalio/api/enums/v1/query.rbs +69 -0
- data/sig/temporalio/api/enums/v1/reset.rbs +106 -0
- data/sig/temporalio/api/enums/v1/schedule.rbs +68 -0
- data/sig/temporalio/api/enums/v1/task_queue.rbs +238 -0
- data/sig/temporalio/api/enums/v1/update.rbs +87 -0
- data/sig/temporalio/api/enums/v1/workflow.rbs +435 -0
- data/sig/temporalio/api/errordetails/v1/message.rbs +532 -0
- data/sig/temporalio/api/export/v1/message.rbs +63 -0
- data/sig/temporalio/api/failure/v1/message.rbs +579 -0
- data/sig/temporalio/api/filter/v1/message.rbs +121 -0
- data/sig/temporalio/api/history/v1/message.rbs +4928 -0
- data/sig/temporalio/api/namespace/v1/message.rbs +465 -0
- data/sig/temporalio/api/nexus/v1/message.rbs +1268 -0
- data/sig/temporalio/api/nexusannotations/v1/options.rbs +76 -0
- data/sig/temporalio/api/nexusservices/workerservice/v1/request_response.rbs +65 -0
- data/sig/temporalio/api/operatorservice/v1/request_response.rbs +679 -0
- data/sig/temporalio/api/operatorservice/v1/service.rbs +23 -0
- data/sig/temporalio/api/operatorservice.rbs +6 -0
- data/sig/temporalio/api/payload_visitor.rbs +298 -0
- data/sig/temporalio/api/protoc_gen_openapiv2/options/annotations.rbs +23 -0
- data/sig/temporalio/api/protoc_gen_openapiv2/options/openapiv2.rbs +1691 -0
- data/sig/temporalio/api/protocol/v1/message.rbs +90 -0
- data/sig/temporalio/api/protometa/v1/annotations.rbs +62 -0
- data/sig/temporalio/api/query/v1/message.rbs +138 -0
- data/sig/temporalio/api/replication/v1/message.rbs +109 -0
- data/sig/temporalio/api/rules/v1/message.rbs +213 -0
- data/sig/temporalio/api/schedule/v1/message.rbs +1066 -0
- data/sig/temporalio/api/sdk/v1/enhanced_stack_trace.rbs +210 -0
- data/sig/temporalio/api/sdk/v1/event_group_marker.rbs +154 -0
- data/sig/temporalio/api/sdk/v1/external_storage.rbs +54 -0
- data/sig/temporalio/api/sdk/v1/task_complete_metadata.rbs +92 -0
- data/sig/temporalio/api/sdk/v1/user_metadata.rbs +58 -0
- data/sig/temporalio/api/sdk/v1/worker_config.rbs +122 -0
- data/sig/temporalio/api/sdk/v1/workflow_metadata.rbs +138 -0
- data/sig/temporalio/api/taskqueue/v1/message.rbs +1013 -0
- data/sig/temporalio/api/testservice/v1/request_response.rbs +125 -0
- data/sig/temporalio/api/testservice/v1/service.rbs +23 -0
- data/sig/temporalio/api/update/v1/message.rbs +349 -0
- data/sig/temporalio/api/version/v1/message.rbs +143 -0
- data/sig/temporalio/api/worker/v1/message.rbs +716 -0
- data/sig/temporalio/api/workflow/v1/message.rbs +2322 -0
- data/sig/temporalio/api/workflowservice/v1/request_response.rbs +12735 -0
- data/sig/temporalio/api/workflowservice/v1/service.rbs +23 -0
- data/sig/temporalio/api/workflowservice.rbs +6 -0
- data/sig/temporalio/api.rbs +4 -0
- data/sig/temporalio/cancellation.rbs +20 -0
- data/sig/temporalio/client/activity_execution.rbs +50 -0
- data/sig/temporalio/client/activity_execution_count.rbs +17 -0
- data/sig/temporalio/client/activity_execution_status.rbs +15 -0
- data/sig/temporalio/client/activity_handle.rbs +26 -0
- data/sig/temporalio/client/activity_id_reference.rbs +16 -0
- data/sig/temporalio/client/async_activity_handle.rbs +41 -0
- data/sig/temporalio/client/connection/cloud_service.rbs +315 -0
- data/sig/temporalio/client/connection/operator_service.rbs +59 -0
- data/sig/temporalio/client/connection/service.rbs +17 -0
- data/sig/temporalio/client/connection/test_service.rbs +35 -0
- data/sig/temporalio/client/connection/workflow_service.rbs +499 -0
- data/sig/temporalio/client/connection.rbs +143 -0
- data/sig/temporalio/client/interceptor.rbs +622 -0
- data/sig/temporalio/client/pending_activity_state.rbs +14 -0
- data/sig/temporalio/client/plugin.rbs +14 -0
- data/sig/temporalio/client/schedule.rbs +337 -0
- data/sig/temporalio/client/schedule_handle.rbs +44 -0
- data/sig/temporalio/client/with_start_workflow_operation.rbs +82 -0
- data/sig/temporalio/client/workflow_execution.rbs +37 -0
- data/sig/temporalio/client/workflow_execution_count.rbs +17 -0
- data/sig/temporalio/client/workflow_execution_status.rbs +16 -0
- data/sig/temporalio/client/workflow_handle.rbs +95 -0
- data/sig/temporalio/client/workflow_query_reject_condition.rbs +12 -0
- data/sig/temporalio/client/workflow_update_handle.rbs +26 -0
- data/sig/temporalio/client/workflow_update_wait_stage.rbs +12 -0
- data/sig/temporalio/client.rbs +271 -0
- data/sig/temporalio/common_enums.rbs +60 -0
- data/sig/temporalio/contrib/open_telemetry.rbs +74 -0
- data/sig/temporalio/converters/data_converter.rbs +32 -0
- data/sig/temporalio/converters/failure_converter.rbs +12 -0
- data/sig/temporalio/converters/payload_codec.rbs +8 -0
- data/sig/temporalio/converters/payload_converter/binary_null.rbs +9 -0
- data/sig/temporalio/converters/payload_converter/binary_plain.rbs +9 -0
- data/sig/temporalio/converters/payload_converter/binary_protobuf.rbs +9 -0
- data/sig/temporalio/converters/payload_converter/composite.rbs +16 -0
- data/sig/temporalio/converters/payload_converter/encoding.rbs +13 -0
- data/sig/temporalio/converters/payload_converter/json_plain.rbs +14 -0
- data/sig/temporalio/converters/payload_converter/json_protobuf.rbs +9 -0
- data/sig/temporalio/converters/payload_converter.rbs +24 -0
- data/sig/temporalio/converters/raw_value.rbs +9 -0
- data/sig/temporalio/converters.rbs +4 -0
- data/sig/temporalio/env_config.rbs +86 -0
- data/sig/temporalio/error/failure.rbs +170 -0
- data/sig/temporalio/error.rbs +88 -0
- data/sig/temporalio/internal/bridge/api/activity_result/activity_result.rbs +247 -0
- data/sig/temporalio/internal/bridge/api/activity_task/activity_task.rbs +372 -0
- data/sig/temporalio/internal/bridge/api/child_workflow/child_workflow.rbs +207 -0
- data/sig/temporalio/internal/bridge/api/common/common.rbs +123 -0
- data/sig/temporalio/internal/bridge/api/core_interface.rbs +231 -0
- data/sig/temporalio/internal/bridge/api/external_data/external_data.rbs +134 -0
- data/sig/temporalio/internal/bridge/api/nexus/nexus.rbs +285 -0
- data/sig/temporalio/internal/bridge/api/workflow_activation/workflow_activation.rbs +1304 -0
- data/sig/temporalio/internal/bridge/api/workflow_commands/workflow_commands.rbs +1526 -0
- data/sig/temporalio/internal/bridge/api/workflow_completion/workflow_completion.rbs +136 -0
- data/sig/temporalio/internal/bridge/api.rbs +8 -0
- data/sig/temporalio/internal/bridge/client.rbs +144 -0
- data/sig/temporalio/internal/bridge/metric.rbs +28 -0
- data/sig/temporalio/internal/bridge/runtime.rbs +97 -0
- data/sig/temporalio/internal/bridge/testing.rbs +91 -0
- data/sig/temporalio/internal/bridge/worker.rbs +199 -0
- data/sig/temporalio/internal/bridge.rbs +36 -0
- data/sig/temporalio/internal/client/implementation.rbs +33 -0
- data/sig/temporalio/internal/google_protobuf.rbs +7 -0
- data/sig/temporalio/internal/metric.rbs +35 -0
- data/sig/temporalio/internal/proto_utils.rbs +94 -0
- data/sig/temporalio/internal/worker/activity_worker.rbs +64 -0
- data/sig/temporalio/internal/worker/multi_runner.rbs +132 -0
- data/sig/temporalio/internal/worker/workflow_instance/child_workflow_handle.rbs +22 -0
- data/sig/temporalio/internal/worker/workflow_instance/context.rbs +172 -0
- data/sig/temporalio/internal/worker/workflow_instance/details.rbs +43 -0
- data/sig/temporalio/internal/worker/workflow_instance/external_workflow_handle.rbs +15 -0
- data/sig/temporalio/internal/worker/workflow_instance/externally_immutable_hash.rbs +16 -0
- data/sig/temporalio/internal/worker/workflow_instance/handler_execution.rbs +19 -0
- data/sig/temporalio/internal/worker/workflow_instance/handler_hash.rbs +14 -0
- data/sig/temporalio/internal/worker/workflow_instance/illegal_call_tracer.rbs +20 -0
- data/sig/temporalio/internal/worker/workflow_instance/inbound_implementation.rbs +19 -0
- data/sig/temporalio/internal/worker/workflow_instance/nexus_client.rbs +25 -0
- data/sig/temporalio/internal/worker/workflow_instance/nexus_operation_handle.rbs +19 -0
- data/sig/temporalio/internal/worker/workflow_instance/outbound_implementation.rbs +35 -0
- data/sig/temporalio/internal/worker/workflow_instance/replay_safe_logger.rbs +16 -0
- data/sig/temporalio/internal/worker/workflow_instance/replay_safe_metric.rbs +15 -0
- data/sig/temporalio/internal/worker/workflow_instance/scheduler.rbs +52 -0
- data/sig/temporalio/internal/worker/workflow_instance.rbs +111 -0
- data/sig/temporalio/internal/worker/workflow_worker.rbs +99 -0
- data/sig/temporalio/internal/workflow_task_failure_error.rbs +6 -0
- data/sig/temporalio/internal.rbs +4 -0
- data/sig/temporalio/metric.rbs +55 -0
- data/sig/temporalio/priority.rbs +17 -0
- data/sig/temporalio/retry_policy.rbs +21 -0
- data/sig/temporalio/runtime/metric_buffer.rbs +49 -0
- data/sig/temporalio/runtime.rbs +118 -0
- data/sig/temporalio/scoped_logger.rbs +15 -0
- data/sig/temporalio/search_attributes.rbs +82 -0
- data/sig/temporalio/simple_plugin.rbs +65 -0
- data/sig/temporalio/testing/activity_environment.rbs +52 -0
- data/sig/temporalio/testing/workflow_environment.rbs +141 -0
- data/sig/temporalio/testing.rbs +4 -0
- data/sig/temporalio/version.rbs +3 -0
- data/sig/temporalio/versioning_override.rbs +17 -0
- data/sig/temporalio/worker/activity_executor/fiber.rbs +9 -0
- data/sig/temporalio/worker/activity_executor/thread_pool.rbs +11 -0
- data/sig/temporalio/worker/activity_executor.rbs +12 -0
- data/sig/temporalio/worker/deployment_options.rbs +17 -0
- data/sig/temporalio/worker/illegal_workflow_call_validator.rbs +25 -0
- data/sig/temporalio/worker/interceptor.rbs +373 -0
- data/sig/temporalio/worker/plugin.rbs +47 -0
- data/sig/temporalio/worker/poller_behavior.rbs +23 -0
- data/sig/temporalio/worker/thread_pool.rbs +44 -0
- data/sig/temporalio/worker/tuner.rbs +121 -0
- data/sig/temporalio/worker/workflow_executor/thread_pool.rbs +58 -0
- data/sig/temporalio/worker/workflow_executor.rbs +15 -0
- data/sig/temporalio/worker/workflow_replayer.rbs +105 -0
- data/sig/temporalio/worker.rbs +168 -0
- data/sig/temporalio/worker_deployment_version.rbs +17 -0
- data/sig/temporalio/workflow/activity_cancellation_type.rbs +11 -0
- data/sig/temporalio/workflow/child_workflow_cancellation_type.rbs +12 -0
- data/sig/temporalio/workflow/child_workflow_handle.rbs +18 -0
- data/sig/temporalio/workflow/definition.rbs +181 -0
- data/sig/temporalio/workflow/external_workflow_handle.rbs +17 -0
- data/sig/temporalio/workflow/future.rbs +24 -0
- data/sig/temporalio/workflow/handler_unfinished_policy.rbs +10 -0
- data/sig/temporalio/workflow/info.rbs +79 -0
- data/sig/temporalio/workflow/nexus_client.rbs +34 -0
- data/sig/temporalio/workflow/nexus_operation_cancellation_type.rbs +12 -0
- data/sig/temporalio/workflow/nexus_operation_handle.rbs +10 -0
- data/sig/temporalio/workflow/parent_close_policy.rbs +12 -0
- data/sig/temporalio/workflow/update_info.rbs +15 -0
- data/sig/temporalio/workflow.rbs +215 -0
- data/sig/temporalio/workflow_history.rbs +13 -0
- data/sig/temporalio.rbs +3 -0
- data/temporalio.gemspec +1 -1
- metadata +445 -2
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
module Temporalio
|
|
2
|
+
class Worker
|
|
3
|
+
class ThreadPool
|
|
4
|
+
def self.default: -> ThreadPool
|
|
5
|
+
|
|
6
|
+
def self._monotonic_time: -> Float
|
|
7
|
+
|
|
8
|
+
def initialize: (
|
|
9
|
+
?max_threads: Integer?,
|
|
10
|
+
?idle_timeout: Float
|
|
11
|
+
) -> void
|
|
12
|
+
|
|
13
|
+
def execute: { -> void } -> void
|
|
14
|
+
|
|
15
|
+
def largest_length: -> Integer
|
|
16
|
+
def scheduled_task_count: -> Integer
|
|
17
|
+
def completed_task_count: -> Integer
|
|
18
|
+
def active_count: -> Integer
|
|
19
|
+
def length: -> Integer
|
|
20
|
+
def queue_length: -> Integer
|
|
21
|
+
def shutdown: -> void
|
|
22
|
+
def kill: -> void
|
|
23
|
+
|
|
24
|
+
def _remove_busy_worker: (Worker worker) -> void
|
|
25
|
+
def _ready_worker: (Worker worker, Float last_message) -> void
|
|
26
|
+
def _worker_died: (Worker worker) -> void
|
|
27
|
+
def _worker_task_completed: -> void
|
|
28
|
+
private def locked_assign_worker: { (?) -> untyped } -> void
|
|
29
|
+
private def locked_enqueue: { (?) -> untyped } -> void
|
|
30
|
+
private def locked_add_busy_worker: -> Worker?
|
|
31
|
+
private def locked_prune_pool: -> void
|
|
32
|
+
private def locked_remove_busy_worker: (Worker worker) -> void
|
|
33
|
+
private def locked_ready_worker: (Worker worker, Float last_message) -> void
|
|
34
|
+
private def locked_worker_died: (Worker worker) -> void
|
|
35
|
+
|
|
36
|
+
class Worker
|
|
37
|
+
def initialize: (ThreadPool pool, Integer id) -> void
|
|
38
|
+
def <<: (Proc block) -> void
|
|
39
|
+
def stop: -> void
|
|
40
|
+
def kill: -> void
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
module Temporalio
|
|
2
|
+
class Worker
|
|
3
|
+
class Tuner
|
|
4
|
+
class SlotSupplier
|
|
5
|
+
class Fixed < SlotSupplier
|
|
6
|
+
attr_reader slots: Integer
|
|
7
|
+
|
|
8
|
+
def initialize: (Integer slots) -> void
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
class ResourceBased < SlotSupplier
|
|
12
|
+
attr_reader tuner_options: ResourceBasedTunerOptions
|
|
13
|
+
attr_reader slot_options: ResourceBasedSlotOptions
|
|
14
|
+
|
|
15
|
+
def initialize: (
|
|
16
|
+
tuner_options: ResourceBasedTunerOptions,
|
|
17
|
+
slot_options: ResourceBasedSlotOptions
|
|
18
|
+
) -> void
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
class Custom < SlotSupplier
|
|
22
|
+
def reserve_slot: (ReserveContext context, Cancellation cancellation) { (untyped) -> void } -> void
|
|
23
|
+
|
|
24
|
+
def try_reserve_slot: (ReserveContext context) -> untyped
|
|
25
|
+
|
|
26
|
+
def mark_slot_used: (MarkUsedContext context) -> void
|
|
27
|
+
|
|
28
|
+
def release_slot: (ReleaseContext context) -> void
|
|
29
|
+
|
|
30
|
+
class ReserveContext
|
|
31
|
+
attr_reader slot_type: :workflow | :activity | :local_activity | :nexus
|
|
32
|
+
attr_reader task_queue: String
|
|
33
|
+
attr_reader worker_identity: String
|
|
34
|
+
attr_reader worker_deployment_name: String
|
|
35
|
+
attr_reader worker_build_id: String
|
|
36
|
+
attr_reader sticky?: bool
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
class MarkUsedContext
|
|
40
|
+
attr_reader slot_info: SlotInfo::Workflow | SlotInfo::Activity | SlotInfo::LocalActivity | SlotInfo::Nexus
|
|
41
|
+
attr_reader permit: untyped
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
class ReleaseContext
|
|
45
|
+
attr_reader slot_info: SlotInfo::Workflow | SlotInfo::Activity | SlotInfo::LocalActivity | SlotInfo::Nexus | nil
|
|
46
|
+
attr_reader permit: untyped
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
module SlotInfo
|
|
50
|
+
class Workflow
|
|
51
|
+
attr_reader workflow_type: String
|
|
52
|
+
attr_reader sticky?: bool
|
|
53
|
+
end
|
|
54
|
+
class Activity
|
|
55
|
+
attr_reader activity_type: String
|
|
56
|
+
end
|
|
57
|
+
class LocalActivity
|
|
58
|
+
attr_reader activity_type: String
|
|
59
|
+
end
|
|
60
|
+
class Nexus
|
|
61
|
+
attr_reader service: String
|
|
62
|
+
attr_reader operation: String
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def _to_bridge_options: (Tuner tuner) -> Internal::Bridge::Worker::TunerSlotSupplierOptions
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
class ResourceBasedTunerOptions
|
|
71
|
+
attr_reader target_memory_usage: Float
|
|
72
|
+
attr_reader target_cpu_usage: Float
|
|
73
|
+
|
|
74
|
+
def initialize: (
|
|
75
|
+
target_memory_usage: Float,
|
|
76
|
+
target_cpu_usage: Float
|
|
77
|
+
) -> void
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
class ResourceBasedSlotOptions
|
|
81
|
+
attr_reader min_slots: Integer?
|
|
82
|
+
attr_reader max_slots: Integer?
|
|
83
|
+
attr_reader ramp_throttle: Float?
|
|
84
|
+
|
|
85
|
+
def initialize: (
|
|
86
|
+
min_slots: Integer?,
|
|
87
|
+
max_slots: Integer?,
|
|
88
|
+
ramp_throttle: Float?
|
|
89
|
+
) -> void
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
def self.create_fixed: (
|
|
93
|
+
?workflow_slots: Integer,
|
|
94
|
+
?activity_slots: Integer,
|
|
95
|
+
?local_activity_slots: Integer
|
|
96
|
+
) -> Tuner
|
|
97
|
+
|
|
98
|
+
def self.create_resource_based: (
|
|
99
|
+
target_memory_usage: Float,
|
|
100
|
+
target_cpu_usage: Float,
|
|
101
|
+
?workflow_options: ResourceBasedSlotOptions,
|
|
102
|
+
?activity_options: ResourceBasedSlotOptions,
|
|
103
|
+
?local_activity_options: ResourceBasedSlotOptions
|
|
104
|
+
) -> Tuner
|
|
105
|
+
|
|
106
|
+
attr_reader workflow_slot_supplier: SlotSupplier
|
|
107
|
+
attr_reader activity_slot_supplier: SlotSupplier
|
|
108
|
+
attr_reader local_activity_slot_supplier: SlotSupplier
|
|
109
|
+
attr_reader custom_slot_supplier_thread_pool: ThreadPool?
|
|
110
|
+
|
|
111
|
+
def initialize: (
|
|
112
|
+
workflow_slot_supplier: SlotSupplier,
|
|
113
|
+
activity_slot_supplier: SlotSupplier,
|
|
114
|
+
local_activity_slot_supplier: SlotSupplier,
|
|
115
|
+
?custom_slot_supplier_thread_pool: ThreadPool?
|
|
116
|
+
) -> void
|
|
117
|
+
|
|
118
|
+
def _to_bridge_options: -> Internal::Bridge::Worker::TunerOptions
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
end
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
module Temporalio
|
|
2
|
+
class Worker
|
|
3
|
+
class WorkflowExecutor
|
|
4
|
+
class ThreadPool < WorkflowExecutor
|
|
5
|
+
def self.default: -> ThreadPool
|
|
6
|
+
|
|
7
|
+
def initialize: (
|
|
8
|
+
?max_threads: Integer,
|
|
9
|
+
?thread_pool: Temporalio::Worker::ThreadPool
|
|
10
|
+
) -> void
|
|
11
|
+
|
|
12
|
+
def _thread_pool: -> Temporalio::Worker::ThreadPool
|
|
13
|
+
|
|
14
|
+
def _remove_workflow: (
|
|
15
|
+
Internal::Worker::WorkflowWorker::State worker_state,
|
|
16
|
+
String run_id
|
|
17
|
+
) -> void
|
|
18
|
+
|
|
19
|
+
class Worker
|
|
20
|
+
LOG_ACTIVATIONS: bool
|
|
21
|
+
|
|
22
|
+
attr_accessor workflow_count: Integer
|
|
23
|
+
|
|
24
|
+
def initialize: (ThreadPool executor) -> void
|
|
25
|
+
|
|
26
|
+
def enqueue_activation: (
|
|
27
|
+
untyped activation,
|
|
28
|
+
Internal::Worker::WorkflowWorker::State worker_state
|
|
29
|
+
) { (untyped completion) -> void } -> void
|
|
30
|
+
|
|
31
|
+
def shutdown: -> void
|
|
32
|
+
|
|
33
|
+
def run: -> void
|
|
34
|
+
|
|
35
|
+
def activate: (
|
|
36
|
+
untyped activation,
|
|
37
|
+
Internal::Worker::WorkflowWorker::State worker_state
|
|
38
|
+
) { (untyped completion) -> void } -> void
|
|
39
|
+
|
|
40
|
+
def create_instance: (
|
|
41
|
+
untyped initial_activation,
|
|
42
|
+
Internal::Worker::WorkflowWorker::State worker_state
|
|
43
|
+
) -> Internal::Worker::WorkflowInstance
|
|
44
|
+
|
|
45
|
+
def evict: (
|
|
46
|
+
Internal::Worker::WorkflowWorker::State worker_state,
|
|
47
|
+
String run_id,
|
|
48
|
+
untyped cache_remove_job
|
|
49
|
+
) -> void
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
class DeadlockError < Exception
|
|
53
|
+
include Internal::WorkflowTaskFailureError
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module Temporalio
|
|
2
|
+
class Worker
|
|
3
|
+
class WorkflowExecutor
|
|
4
|
+
def _validate_worker: (
|
|
5
|
+
Internal::Worker::WorkflowWorker workflow_worker,
|
|
6
|
+
Internal::Worker::WorkflowWorker::State worker_state
|
|
7
|
+
) -> void
|
|
8
|
+
|
|
9
|
+
def _activate: (
|
|
10
|
+
untyped activation,
|
|
11
|
+
Internal::Worker::WorkflowWorker::State worker_state
|
|
12
|
+
) { (untyped completion) -> void } -> void
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
module Temporalio
|
|
2
|
+
class Worker
|
|
3
|
+
class WorkflowReplayer
|
|
4
|
+
class Options
|
|
5
|
+
attr_reader workflows: Array[singleton(Workflow::Definition) | Workflow::Definition::Info]
|
|
6
|
+
attr_reader namespace: String
|
|
7
|
+
attr_reader task_queue: String
|
|
8
|
+
attr_reader data_converter: Converters::DataConverter
|
|
9
|
+
attr_reader workflow_executor: Worker::WorkflowExecutor
|
|
10
|
+
attr_reader plugins: Array[Plugin]
|
|
11
|
+
attr_reader interceptors: Array[Interceptor::Workflow]
|
|
12
|
+
attr_reader identity: String?
|
|
13
|
+
attr_reader logger: Logger
|
|
14
|
+
attr_reader illegal_workflow_calls: Hash[String, :all | Array[Symbol]]
|
|
15
|
+
attr_reader workflow_failure_exception_types: Array[singleton(Exception)]
|
|
16
|
+
attr_reader workflow_payload_codec_thread_pool: ThreadPool?
|
|
17
|
+
attr_reader unsafe_workflow_io_enabled: bool
|
|
18
|
+
attr_reader debug_mode: bool
|
|
19
|
+
attr_reader runtime: Runtime
|
|
20
|
+
|
|
21
|
+
def initialize: (
|
|
22
|
+
workflows: Array[singleton(Workflow::Definition) | Workflow::Definition::Info],
|
|
23
|
+
namespace: String,
|
|
24
|
+
task_queue: String,
|
|
25
|
+
data_converter: Converters::DataConverter,
|
|
26
|
+
workflow_executor: Worker::WorkflowExecutor,
|
|
27
|
+
plugins: Array[Plugin],
|
|
28
|
+
interceptors: Array[Interceptor::Workflow],
|
|
29
|
+
identity: String?,
|
|
30
|
+
logger: Logger,
|
|
31
|
+
illegal_workflow_calls: Hash[String, :all | Array[Symbol]],
|
|
32
|
+
workflow_failure_exception_types: Array[singleton(Exception)],
|
|
33
|
+
workflow_payload_codec_thread_pool: ThreadPool?,
|
|
34
|
+
unsafe_workflow_io_enabled: bool,
|
|
35
|
+
debug_mode: bool,
|
|
36
|
+
runtime: Runtime
|
|
37
|
+
) -> void
|
|
38
|
+
|
|
39
|
+
def with: (**Object kwargs) -> Options
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
attr_reader options: Options
|
|
43
|
+
|
|
44
|
+
def initialize: (
|
|
45
|
+
workflows: Array[singleton(Workflow::Definition) | Workflow::Definition::Info],
|
|
46
|
+
?namespace: String,
|
|
47
|
+
?task_queue: String,
|
|
48
|
+
?data_converter: Converters::DataConverter,
|
|
49
|
+
?workflow_executor: Worker::WorkflowExecutor,
|
|
50
|
+
?plugins: Array[Plugin],
|
|
51
|
+
?interceptors: Array[Interceptor::Workflow],
|
|
52
|
+
?identity: String?,
|
|
53
|
+
?logger: Logger,
|
|
54
|
+
?illegal_workflow_calls: Hash[String, :all | Array[Symbol]],
|
|
55
|
+
?workflow_failure_exception_types: Array[singleton(Exception)],
|
|
56
|
+
?workflow_payload_codec_thread_pool: ThreadPool?,
|
|
57
|
+
?unsafe_workflow_io_enabled: bool,
|
|
58
|
+
?debug_mode: bool,
|
|
59
|
+
?runtime: Runtime
|
|
60
|
+
) ?{ (ReplayWorker worker) -> untyped } -> void
|
|
61
|
+
|
|
62
|
+
def replay_workflow: (
|
|
63
|
+
WorkflowHistory history,
|
|
64
|
+
?raise_on_replay_failure: bool
|
|
65
|
+
) -> ReplayResult
|
|
66
|
+
|
|
67
|
+
def replay_workflows: (
|
|
68
|
+
Enumerable[WorkflowHistory] histories,
|
|
69
|
+
?raise_on_replay_failure: bool
|
|
70
|
+
) -> Array[ReplayResult]
|
|
71
|
+
|
|
72
|
+
def with_replay_worker: [T] { (ReplayWorker worker) -> T } -> T
|
|
73
|
+
|
|
74
|
+
class ReplayResult
|
|
75
|
+
attr_reader history: WorkflowHistory
|
|
76
|
+
attr_reader replay_failure: Exception?
|
|
77
|
+
|
|
78
|
+
def initialize: (history: WorkflowHistory, replay_failure: Exception?) -> void
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
class ReplayWorker
|
|
82
|
+
def initialize: (
|
|
83
|
+
options: Options,
|
|
84
|
+
workflow_definitions: Hash[String?, Workflow::Definition::Info],
|
|
85
|
+
nondeterminism_as_workflow_fail: bool,
|
|
86
|
+
nondeterminism_as_workflow_fail_for_types: Array[String]
|
|
87
|
+
) -> void
|
|
88
|
+
|
|
89
|
+
def replay_workflow: (
|
|
90
|
+
WorkflowHistory history,
|
|
91
|
+
?raise_on_replay_failure: bool
|
|
92
|
+
) -> ReplayResult
|
|
93
|
+
|
|
94
|
+
def _shutdown: -> void
|
|
95
|
+
def _bridge_worker: -> Internal::Bridge::Worker
|
|
96
|
+
def _initiate_shutdown: -> void
|
|
97
|
+
def _wait_all_complete: -> void
|
|
98
|
+
|
|
99
|
+
private
|
|
100
|
+
|
|
101
|
+
def workflow_activation_work_drained?: -> bool
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
end
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
module Temporalio
|
|
2
|
+
class Worker
|
|
3
|
+
class PatchActivationInput
|
|
4
|
+
attr_reader workflow_info: Workflow::Info
|
|
5
|
+
attr_reader patch_id: String
|
|
6
|
+
|
|
7
|
+
def initialize: (workflow_info: Workflow::Info, patch_id: String) -> void
|
|
8
|
+
def with: (**Object kwargs) -> PatchActivationInput
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
class Options
|
|
12
|
+
attr_reader client: Client
|
|
13
|
+
attr_reader task_queue: String
|
|
14
|
+
attr_reader activities: Array[Activity::Definition | singleton(Activity::Definition) | Activity::Definition::Info]
|
|
15
|
+
attr_reader workflows: Array[singleton(Workflow::Definition) | Workflow::Definition::Info]
|
|
16
|
+
attr_reader tuner: Tuner
|
|
17
|
+
attr_reader activity_executors: Hash[Symbol, Worker::ActivityExecutor]
|
|
18
|
+
attr_reader workflow_executor: Worker::WorkflowExecutor
|
|
19
|
+
attr_reader plugins: Array[Plugin]
|
|
20
|
+
attr_reader interceptors: Array[Interceptor::Activity | Interceptor::Workflow]
|
|
21
|
+
attr_reader identity: String
|
|
22
|
+
attr_reader logger: Logger
|
|
23
|
+
attr_reader max_cached_workflows: Integer
|
|
24
|
+
attr_reader max_concurrent_workflow_task_polls: Integer
|
|
25
|
+
attr_reader nonsticky_to_sticky_poll_ratio: Float
|
|
26
|
+
attr_reader max_concurrent_activity_task_polls: Integer
|
|
27
|
+
attr_reader no_remote_activities: bool
|
|
28
|
+
attr_reader sticky_queue_schedule_to_start_timeout: Float
|
|
29
|
+
attr_reader max_heartbeat_throttle_interval: Float
|
|
30
|
+
attr_reader default_heartbeat_throttle_interval: Float
|
|
31
|
+
attr_reader max_activities_per_second: Float?
|
|
32
|
+
attr_reader max_task_queue_activities_per_second: Float?
|
|
33
|
+
attr_reader graceful_shutdown_period: Float
|
|
34
|
+
attr_reader disable_eager_activity_execution: bool
|
|
35
|
+
attr_reader illegal_workflow_calls: Hash[String, :all | Array[Symbol | IllegalWorkflowCallValidator] | IllegalWorkflowCallValidator]
|
|
36
|
+
attr_reader workflow_failure_exception_types: Array[singleton(Exception)]
|
|
37
|
+
attr_reader workflow_payload_codec_thread_pool: ThreadPool?
|
|
38
|
+
attr_reader unsafe_workflow_io_enabled: bool
|
|
39
|
+
attr_reader workflow_task_poller_behavior: PollerBehavior
|
|
40
|
+
attr_reader activity_task_poller_behavior: PollerBehavior
|
|
41
|
+
attr_reader deployment_options: Worker::DeploymentOptions
|
|
42
|
+
attr_reader patch_activation_callback: Proc?
|
|
43
|
+
attr_reader debug_mode: bool
|
|
44
|
+
|
|
45
|
+
def initialize: (
|
|
46
|
+
client: Client,
|
|
47
|
+
task_queue: String,
|
|
48
|
+
activities: Array[Activity::Definition | singleton(Activity::Definition) | Activity::Definition::Info],
|
|
49
|
+
workflows: Array[singleton(Workflow::Definition) | Workflow::Definition::Info],
|
|
50
|
+
tuner: Tuner,
|
|
51
|
+
activity_executors: Hash[Symbol, Worker::ActivityExecutor],
|
|
52
|
+
workflow_executor: Worker::WorkflowExecutor,
|
|
53
|
+
plugins: Array[Plugin],
|
|
54
|
+
interceptors: Array[Interceptor::Activity | Interceptor::Workflow],
|
|
55
|
+
identity: String?,
|
|
56
|
+
logger: Logger,
|
|
57
|
+
max_cached_workflows: Integer,
|
|
58
|
+
max_concurrent_workflow_task_polls: Integer,
|
|
59
|
+
nonsticky_to_sticky_poll_ratio: Float,
|
|
60
|
+
max_concurrent_activity_task_polls: Integer,
|
|
61
|
+
no_remote_activities: bool,
|
|
62
|
+
sticky_queue_schedule_to_start_timeout: Float,
|
|
63
|
+
max_heartbeat_throttle_interval: Float,
|
|
64
|
+
default_heartbeat_throttle_interval: Float,
|
|
65
|
+
max_activities_per_second: Float?,
|
|
66
|
+
max_task_queue_activities_per_second: Float?,
|
|
67
|
+
graceful_shutdown_period: Float,
|
|
68
|
+
disable_eager_activity_execution: bool,
|
|
69
|
+
illegal_workflow_calls: Hash[String, :all | Array[Symbol | IllegalWorkflowCallValidator] | IllegalWorkflowCallValidator],
|
|
70
|
+
workflow_failure_exception_types: Array[singleton(Exception)],
|
|
71
|
+
workflow_payload_codec_thread_pool: ThreadPool?,
|
|
72
|
+
unsafe_workflow_io_enabled: bool,
|
|
73
|
+
workflow_task_poller_behavior: PollerBehavior,
|
|
74
|
+
activity_task_poller_behavior: PollerBehavior,
|
|
75
|
+
deployment_options: Worker::DeploymentOptions,
|
|
76
|
+
patch_activation_callback: Proc?,
|
|
77
|
+
debug_mode: bool
|
|
78
|
+
) -> void
|
|
79
|
+
|
|
80
|
+
def with: (**Object kwargs) -> Options
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
def self.default_build_id: -> String
|
|
84
|
+
def self._load_default_build_id: -> String
|
|
85
|
+
def self.default_deployment_options: -> Worker::DeploymentOptions
|
|
86
|
+
|
|
87
|
+
def self.run_all: [T] (
|
|
88
|
+
*Worker workers,
|
|
89
|
+
?cancellation: Cancellation,
|
|
90
|
+
?shutdown_signals: Array[String | Integer],
|
|
91
|
+
?raise_in_block_on_shutdown: Exception?,
|
|
92
|
+
?wait_block_complete: bool
|
|
93
|
+
) ?{ -> T } -> T
|
|
94
|
+
|
|
95
|
+
def self._run_all_root: [T] (
|
|
96
|
+
*Worker workers,
|
|
97
|
+
cancellation: Cancellation,
|
|
98
|
+
shutdown_signals: Array[String | Integer],
|
|
99
|
+
raise_in_block_on_shutdown: Exception?,
|
|
100
|
+
wait_block_complete: bool
|
|
101
|
+
) ?{ -> T } -> T
|
|
102
|
+
|
|
103
|
+
def self.default_illegal_workflow_calls: -> Hash[String, :all | Array[Symbol | IllegalWorkflowCallValidator] | IllegalWorkflowCallValidator]
|
|
104
|
+
|
|
105
|
+
def self._validate_plugins!: (Array[Plugin] plugins) -> void
|
|
106
|
+
|
|
107
|
+
attr_reader options: Options
|
|
108
|
+
|
|
109
|
+
def initialize: (
|
|
110
|
+
client: Client,
|
|
111
|
+
task_queue: String,
|
|
112
|
+
?activities: Array[Activity::Definition | singleton(Activity::Definition) | Activity::Definition::Info],
|
|
113
|
+
?workflows: Array[singleton(Workflow::Definition) | Workflow::Definition::Info],
|
|
114
|
+
?tuner: Tuner,
|
|
115
|
+
?activity_executors: Hash[Symbol, Worker::ActivityExecutor],
|
|
116
|
+
?workflow_executor: Worker::WorkflowExecutor,
|
|
117
|
+
?plugins: Array[Plugin],
|
|
118
|
+
?interceptors: Array[Interceptor::Activity | Interceptor::Workflow],
|
|
119
|
+
?identity: String?,
|
|
120
|
+
?logger: Logger,
|
|
121
|
+
?max_cached_workflows: Integer,
|
|
122
|
+
?max_concurrent_workflow_task_polls: Integer,
|
|
123
|
+
?nonsticky_to_sticky_poll_ratio: Float,
|
|
124
|
+
?max_concurrent_activity_task_polls: Integer,
|
|
125
|
+
?no_remote_activities: bool,
|
|
126
|
+
?sticky_queue_schedule_to_start_timeout: Float,
|
|
127
|
+
?max_heartbeat_throttle_interval: Float,
|
|
128
|
+
?default_heartbeat_throttle_interval: Float,
|
|
129
|
+
?max_activities_per_second: Float?,
|
|
130
|
+
?max_task_queue_activities_per_second: Float?,
|
|
131
|
+
?graceful_shutdown_period: Float,
|
|
132
|
+
?disable_eager_activity_execution: bool,
|
|
133
|
+
?illegal_workflow_calls: Hash[String, :all | Array[Symbol | IllegalWorkflowCallValidator] | IllegalWorkflowCallValidator],
|
|
134
|
+
?workflow_failure_exception_types: Array[singleton(Exception)],
|
|
135
|
+
?workflow_payload_codec_thread_pool: ThreadPool?,
|
|
136
|
+
?unsafe_workflow_io_enabled: bool,
|
|
137
|
+
?workflow_task_poller_behavior: PollerBehavior,
|
|
138
|
+
?activity_task_poller_behavior: PollerBehavior,
|
|
139
|
+
?deployment_options: Worker::DeploymentOptions,
|
|
140
|
+
?patch_activation_callback: Proc?,
|
|
141
|
+
?debug_mode: bool
|
|
142
|
+
) -> void
|
|
143
|
+
|
|
144
|
+
def _initialize_from_options: -> void
|
|
145
|
+
|
|
146
|
+
def task_queue: -> String
|
|
147
|
+
|
|
148
|
+
def client: -> Client
|
|
149
|
+
def client=: (Client new_client) -> void
|
|
150
|
+
|
|
151
|
+
def run: [T] (
|
|
152
|
+
?cancellation: Cancellation,
|
|
153
|
+
?shutdown_signals: Array[String | Integer],
|
|
154
|
+
?raise_in_block_on_shutdown: Exception?,
|
|
155
|
+
?wait_block_complete: bool
|
|
156
|
+
) ?{ -> T } -> T
|
|
157
|
+
|
|
158
|
+
def _worker_shutdown_cancellation: -> Cancellation
|
|
159
|
+
def _initiate_shutdown: -> void
|
|
160
|
+
def _wait_all_complete: -> void
|
|
161
|
+
def _bridge_worker: -> Internal::Bridge::Worker
|
|
162
|
+
def _activity_interceptors: -> Array[Interceptor::Activity]
|
|
163
|
+
def _on_poll_bytes: (Internal::Worker::MultiRunner runner, Symbol worker_type, String bytes) -> void
|
|
164
|
+
def _on_shutdown_complete: -> void
|
|
165
|
+
def _assert_valid_local_activity: (String) -> void
|
|
166
|
+
def _plugins: -> Array[Plugin]
|
|
167
|
+
end
|
|
168
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module Temporalio
|
|
2
|
+
class WorkerDeploymentVersion
|
|
3
|
+
attr_reader deployment_name: String
|
|
4
|
+
attr_reader build_id: String
|
|
5
|
+
|
|
6
|
+
def self.from_canonical_string: (String canonical) -> WorkerDeploymentVersion
|
|
7
|
+
|
|
8
|
+
def self._from_bridge: (Internal::Bridge::Worker::WorkerDeploymentVersion? bridge) -> WorkerDeploymentVersion?
|
|
9
|
+
|
|
10
|
+
def initialize: (deployment_name: String, build_id: String) -> void
|
|
11
|
+
|
|
12
|
+
def to_canonical_string: -> String
|
|
13
|
+
|
|
14
|
+
def _to_bridge_options: -> Internal::Bridge::Worker::WorkerDeploymentVersion
|
|
15
|
+
def _to_proto: -> Api::Deployment::V1::WorkerDeploymentVersion
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
module Temporalio
|
|
2
|
+
module Workflow
|
|
3
|
+
class ChildWorkflowHandle
|
|
4
|
+
def id: -> String
|
|
5
|
+
def first_execution_run_id: -> String
|
|
6
|
+
def result_hint: -> Object?
|
|
7
|
+
|
|
8
|
+
def result: (?result_hint: Object?) -> Object?
|
|
9
|
+
|
|
10
|
+
def signal: (
|
|
11
|
+
Workflow::Definition::Signal | Symbol | String signal,
|
|
12
|
+
*Object? args,
|
|
13
|
+
?cancellation: Cancellation,
|
|
14
|
+
?arg_hints: Array[Object]?
|
|
15
|
+
) -> void
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|