Skip to content

Expose core "runtime" as temporalio.runtime.Runtime #240

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jan 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions temporalio/api/batch/v1/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
from .message_pb2 import (
BatchOperationCancellation,
BatchOperationDeletion,
BatchOperationInfo,
BatchOperationSignal,
BatchOperationTermination,
)

__all__ = [
"BatchOperationCancellation",
"BatchOperationDeletion",
"BatchOperationInfo",
"BatchOperationSignal",
"BatchOperationTermination",
Expand Down
18 changes: 16 additions & 2 deletions temporalio/api/batch/v1/message_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions temporalio/api/batch/v1/message_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,24 @@ class BatchOperationCancellation(google.protobuf.message.Message):
) -> None: ...

global___BatchOperationCancellation = BatchOperationCancellation

class BatchOperationDeletion(google.protobuf.message.Message):
"""BatchOperationDeletion sends deletion requests to batch workflows.
Keep the parameter in sync with temporalio.api.workflowservice.v1.DeleteWorkflowExecutionRequest.
"""

DESCRIPTOR: google.protobuf.descriptor.Descriptor

IDENTITY_FIELD_NUMBER: builtins.int
identity: builtins.str
"""The identity of the worker/client"""
def __init__(
self,
*,
identity: builtins.str = ...,
) -> None: ...
def ClearField(
self, field_name: typing_extensions.Literal["identity", b"identity"]
) -> None: ...

global___BatchOperationDeletion = BatchOperationDeletion
2 changes: 2 additions & 0 deletions temporalio/api/command/v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
FailWorkflowExecutionCommandAttributes,
ModifyWorkflowPropertiesCommandAttributes,
RecordMarkerCommandAttributes,
RejectWorkflowUpdateCommandAttributes,
RequestCancelActivityTaskCommandAttributes,
RequestCancelExternalWorkflowExecutionCommandAttributes,
ScheduleActivityTaskCommandAttributes,
Expand All @@ -29,6 +30,7 @@
"FailWorkflowExecutionCommandAttributes",
"ModifyWorkflowPropertiesCommandAttributes",
"RecordMarkerCommandAttributes",
"RejectWorkflowUpdateCommandAttributes",
"RequestCancelActivityTaskCommandAttributes",
"RequestCancelExternalWorkflowExecutionCommandAttributes",
"ScheduleActivityTaskCommandAttributes",
Expand Down
98 changes: 57 additions & 41 deletions temporalio/api/command/v1/message_pb2.py

Large diffs are not rendered by default.

102 changes: 59 additions & 43 deletions temporalio/api/command/v1/message_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ import google.protobuf.message
import sys
import temporalio.api.common.v1.message_pb2
import temporalio.api.enums.v1.command_type_pb2
import temporalio.api.enums.v1.update_pb2
import temporalio.api.enums.v1.workflow_pb2
import temporalio.api.failure.v1.message_pb2
import temporalio.api.interaction.v1.message_pb2
import temporalio.api.taskqueue.v1.message_pb2

if sys.version_info >= (3, 8):
Expand Down Expand Up @@ -858,77 +858,81 @@ global___StartChildWorkflowExecutionCommandAttributes = (
class AcceptWorkflowUpdateCommandAttributes(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor

UPDATE_ID_FIELD_NUMBER: builtins.int
update_id: builtins.str
"""A unique identifier for an update within a given workflow context"""
META_FIELD_NUMBER: builtins.int
INPUT_FIELD_NUMBER: builtins.int
@property
def meta(self) -> temporalio.api.interaction.v1.message_pb2.Meta: ...
@property
def input(self) -> temporalio.api.interaction.v1.message_pb2.Input: ...
def __init__(
self,
*,
update_id: builtins.str = ...,
meta: temporalio.api.interaction.v1.message_pb2.Meta | None = ...,
input: temporalio.api.interaction.v1.message_pb2.Input | None = ...,
) -> None: ...
def HasField(
self, field_name: typing_extensions.Literal["input", b"input", "meta", b"meta"]
) -> builtins.bool: ...
def ClearField(
self, field_name: typing_extensions.Literal["update_id", b"update_id"]
self, field_name: typing_extensions.Literal["input", b"input", "meta", b"meta"]
) -> None: ...

global___AcceptWorkflowUpdateCommandAttributes = AcceptWorkflowUpdateCommandAttributes

class CompleteWorkflowUpdateCommandAttributes(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor

UPDATE_ID_FIELD_NUMBER: builtins.int
DURABILITY_PREFERENCE_FIELD_NUMBER: builtins.int
SUCCESS_FIELD_NUMBER: builtins.int
FAILURE_FIELD_NUMBER: builtins.int
update_id: builtins.str
"""A unique identifier for an update within a given workflow context"""
durability_preference: temporalio.api.enums.v1.update_pb2.WorkflowUpdateDurabilityPreference.ValueType
"""Whether the server should attempt to bypass making this update rejection
durable in history. This field is only consulted when the result field
indicates failure. Leaving this field in its default state (i.e.
UPDATE_WORKFLOW_REJECTION_DURABILITY_PREFERENCE_UNSPECIFIED) will result
in making the rejection durable.
"""
META_FIELD_NUMBER: builtins.int
OUTPUT_FIELD_NUMBER: builtins.int
@property
def success(self) -> temporalio.api.common.v1.message_pb2.Payloads: ...
def meta(self) -> temporalio.api.interaction.v1.message_pb2.Meta: ...
@property
def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: ...
def output(self) -> temporalio.api.interaction.v1.message_pb2.Output: ...
def __init__(
self,
*,
update_id: builtins.str = ...,
durability_preference: temporalio.api.enums.v1.update_pb2.WorkflowUpdateDurabilityPreference.ValueType = ...,
success: temporalio.api.common.v1.message_pb2.Payloads | None = ...,
failure: temporalio.api.failure.v1.message_pb2.Failure | None = ...,
meta: temporalio.api.interaction.v1.message_pb2.Meta | None = ...,
output: temporalio.api.interaction.v1.message_pb2.Output | None = ...,
) -> None: ...
def HasField(
self,
field_name: typing_extensions.Literal[
"failure", b"failure", "result", b"result", "success", b"success"
],
field_name: typing_extensions.Literal["meta", b"meta", "output", b"output"],
) -> builtins.bool: ...
def ClearField(
self,
field_name: typing_extensions.Literal[
"durability_preference",
b"durability_preference",
"failure",
b"failure",
"result",
b"result",
"success",
b"success",
"update_id",
b"update_id",
],
field_name: typing_extensions.Literal["meta", b"meta", "output", b"output"],
) -> None: ...
def WhichOneof(
self, oneof_group: typing_extensions.Literal["result", b"result"]
) -> typing_extensions.Literal["success", "failure"] | None: ...

global___CompleteWorkflowUpdateCommandAttributes = (
CompleteWorkflowUpdateCommandAttributes
)

class RejectWorkflowUpdateCommandAttributes(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor

META_FIELD_NUMBER: builtins.int
FAILURE_FIELD_NUMBER: builtins.int
@property
def meta(self) -> temporalio.api.interaction.v1.message_pb2.Meta: ...
@property
def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: ...
def __init__(
self,
*,
meta: temporalio.api.interaction.v1.message_pb2.Meta | None = ...,
failure: temporalio.api.failure.v1.message_pb2.Failure | None = ...,
) -> None: ...
def HasField(
self,
field_name: typing_extensions.Literal["failure", b"failure", "meta", b"meta"],
) -> builtins.bool: ...
def ClearField(
self,
field_name: typing_extensions.Literal["failure", b"failure", "meta", b"meta"],
) -> None: ...

global___RejectWorkflowUpdateCommandAttributes = RejectWorkflowUpdateCommandAttributes

class Command(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor

Expand All @@ -949,6 +953,7 @@ class Command(google.protobuf.message.Message):
ACCEPT_WORKFLOW_UPDATE_COMMAND_ATTRIBUTES_FIELD_NUMBER: builtins.int
COMPLETE_WORKFLOW_UPDATE_COMMAND_ATTRIBUTES_FIELD_NUMBER: builtins.int
MODIFY_WORKFLOW_PROPERTIES_COMMAND_ATTRIBUTES_FIELD_NUMBER: builtins.int
REJECT_WORKFLOW_UPDATE_COMMAND_ATTRIBUTES_FIELD_NUMBER: builtins.int
command_type: temporalio.api.enums.v1.command_type_pb2.CommandType.ValueType
@property
def schedule_activity_task_command_attributes(
Expand Down Expand Up @@ -1014,6 +1019,10 @@ class Command(google.protobuf.message.Message):
def modify_workflow_properties_command_attributes(
self,
) -> global___ModifyWorkflowPropertiesCommandAttributes: ...
@property
def reject_workflow_update_command_attributes(
self,
) -> global___RejectWorkflowUpdateCommandAttributes: ...
def __init__(
self,
*,
Expand Down Expand Up @@ -1050,6 +1059,8 @@ class Command(google.protobuf.message.Message):
| None = ...,
modify_workflow_properties_command_attributes: global___ModifyWorkflowPropertiesCommandAttributes
| None = ...,
reject_workflow_update_command_attributes: global___RejectWorkflowUpdateCommandAttributes
| None = ...,
) -> None: ...
def HasField(
self,
Expand All @@ -1074,6 +1085,8 @@ class Command(google.protobuf.message.Message):
b"modify_workflow_properties_command_attributes",
"record_marker_command_attributes",
b"record_marker_command_attributes",
"reject_workflow_update_command_attributes",
b"reject_workflow_update_command_attributes",
"request_cancel_activity_task_command_attributes",
b"request_cancel_activity_task_command_attributes",
"request_cancel_external_workflow_execution_command_attributes",
Expand Down Expand Up @@ -1115,6 +1128,8 @@ class Command(google.protobuf.message.Message):
b"modify_workflow_properties_command_attributes",
"record_marker_command_attributes",
b"record_marker_command_attributes",
"reject_workflow_update_command_attributes",
b"reject_workflow_update_command_attributes",
"request_cancel_activity_task_command_attributes",
b"request_cancel_activity_task_command_attributes",
"request_cancel_external_workflow_execution_command_attributes",
Expand Down Expand Up @@ -1150,6 +1165,7 @@ class Command(google.protobuf.message.Message):
"accept_workflow_update_command_attributes",
"complete_workflow_update_command_attributes",
"modify_workflow_properties_command_attributes",
"reject_workflow_update_command_attributes",
] | None: ...

global___Command = Command
4 changes: 2 additions & 2 deletions temporalio/api/common/v1/message_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading