module documentation

Undocumented

Class _SignalSlot Allows one in-flight or successful signal per Temporal operation handler invocation.
Class _TemporalCancelOperationContext Context for a Nexus cancel operation being handled by a Temporal Nexus Worker.
Class _TemporalOperationCtx No class docstring; 0/1 property, 3/6 class variables documented
Class _TemporalStartOperationContext Context for a Nexus start operation being handled by a Temporal Nexus Worker.
Function _apply_nexus_context_to_start_activity_request Apply the current Nexus operation context to an activity start request.
Function _apply_nexus_context_to_start_workflow_request Apply the current Nexus operation context to a workflow start request.
Function _apply_nexus_context_to_start_workflow_update_request Apply the current Nexus operation context to a Workflow Update request.
Function _apply_nexus_serialization_context_to_start_workflow_request Send the current Nexus operation's serialization context with a workflow start request.
Function _apply_nexus_serialization_context_to_workflow_update_request Send the current Nexus operation's serialization context with a Workflow Update request.
Function _apply_query_workflow_response_to_nexus_context Apply a workflow query response link to the current Nexus context.
Function _apply_signal_workflow_response_to_nexus_context Apply a workflow signal response link to the current Nexus context.
Function _apply_start_activity_response_to_nexus_context Undocumented
Function _apply_start_workflow_response_to_nexus_context Undocumented
Function _apply_start_workflow_update_response_to_nexus_context Undocumented
Function _current_propagated_nexus_serialization_context The serialization context of the Nexus operation being handled, in the form sent with start requests, or None outside a Nexus start operation handler.
Function _in_nexus_backing_start_context Undocumented
Function _nexus_backing_start_context Undocumented
Function _signal_request_nexus_context Apply the current Nexus operation context to a signal or signal-with-start RPC.
Async Function _start_nexus_backing_workflow Undocumented
Async Function _start_nexus_operation_workflow_update Undocumented
Function _temporal_context Undocumented
Function _try_start_operation_context Return the active Nexus start-operation context, if any.
Function _try_temporal_context Undocumented
Type Variable _OperationCtxT Undocumented
Variable _temporal_cancel_operation_context Undocumented
Variable _temporal_nexus_backing_start_context Undocumented
Variable _temporal_operation_signal_slot Undocumented
Variable _temporal_start_operation_context Undocumented
def _apply_nexus_context_to_start_activity_request(req: temporalio.api.workflowservice.v1.StartActivityExecutionRequest): (source)

Apply the current Nexus operation context to an activity start request.

This is a no-op outside a Nexus operation context. Within one, it attaches the Nexus request ID and the operation's serialization context and configures conflict handling to preserve the Nexus metadata. Inbound links are attached to the completion callback when the activity backs the operation and has a callback, and to the request otherwise. on_conflict_options is populated only when there are links or callbacks to attach.

def _apply_nexus_context_to_start_workflow_request(req: temporalio.api.workflowservice.v1.StartWorkflowExecutionRequest): (source)

Apply the current Nexus operation context to a workflow start request.

This is a no-op outside a Nexus operation context. Within one, it sends the operation's serialization context, attaches inbound links and configures conflict handling to preserve Nexus metadata. The Nexus request ID and completion callbacks are added only when the workflow is backing the Nexus operation. on_conflict_options is populated only when there are links or callbacks to attach.

def _apply_nexus_context_to_start_workflow_update_request(req: temporalio.api.workflowservice.v1.UpdateWorkflowExecutionRequest): (source)

Apply the current Nexus operation context to a Workflow Update request.

This is a no-op unless the update is backing the current Nexus operation.

def _apply_nexus_serialization_context_to_start_workflow_request(req: temporalio.api.workflowservice.v1.StartWorkflowExecutionRequest): (source)

Send the current Nexus operation's serialization context with a workflow start request.

This is a no-op outside a Nexus operation context.

def _apply_nexus_serialization_context_to_workflow_update_request(req: temporalio.api.workflowservice.v1.UpdateWorkflowExecutionRequest): (source)

Send the current Nexus operation's serialization context with a Workflow Update request.

This is a no-op outside a Nexus operation context.

def _apply_query_workflow_response_to_nexus_context(resp: temporalio.api.workflowservice.v1.QueryWorkflowResponse): (source)

Apply a workflow query response link to the current Nexus context.

def _apply_signal_workflow_response_to_nexus_context(resp: temporalio.api.workflowservice.v1.SignalWorkflowExecutionResponse): (source)

Apply a workflow signal response link to the current Nexus context.

def _apply_start_activity_response_to_nexus_context(activity_id: str, resp: temporalio.api.workflowservice.v1.StartActivityExecutionResponse): (source)

Undocumented

def _apply_start_workflow_response_to_nexus_context(workflow_handle: temporalio.client.WorkflowHandle[Any, Any]): (source)

Undocumented

def _apply_start_workflow_update_response_to_nexus_context(resp: temporalio.api.workflowservice.v1.UpdateWorkflowExecutionResponse): (source)

Undocumented

def _current_propagated_nexus_serialization_context() -> temporalio.api.nexus.v1.PropagatedSerializationContext | None: (source)

The serialization context of the Nexus operation being handled, in the form sent with start requests, or None outside a Nexus start operation handler.

A workflow or standalone activity started by the handler returns its result and failure to the Nexus caller, so the server propagates this context to the worker and to clients reading them.

def _in_nexus_backing_start_context() -> bool: (source)

Undocumented

def _nexus_backing_start_context() -> Generator[None]: (source)

Undocumented

Apply the current Nexus operation context to a signal or signal-with-start RPC.

Inside a Temporal operation handler, the request reuses the Nexus request ID and takes the invocation's only signal, which is released if the RPC fails.

async def _start_nexus_backing_workflow(temporal_context: _TemporalStartOperationContext, workflow: str | Callable[..., Awaitable[ReturnType]], arg: Any = temporalio.common._arg_unset, *, args: Sequence[Any] = [], id: str, task_queue: str | None = None, result_type: type | None = None, execution_timeout: timedelta | None = None, run_timeout: timedelta | None = None, task_timeout: timedelta | None = None, id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy = temporalio.common.WorkflowIDConflictPolicy.UNSPECIFIED, retry_policy: temporalio.common.RetryPolicy | None = None, cron_schedule: str = '', memo: Mapping[str, Any] | None = None, search_attributes: None | temporalio.common.TypedSearchAttributes | temporalio.common.SearchAttributes = None, static_summary: str | None = None, static_details: str | None = None, start_delay: timedelta | None = None, start_signal: str | None = None, start_signal_args: Sequence[Any] = [], rpc_metadata: Mapping[str, str | bytes] = {}, rpc_timeout: timedelta | None = None, request_eager_start: bool = False, priority: temporalio.common.Priority = temporalio.common.Priority.default, versioning_override: temporalio.common.VersioningOverride | None = None) -> WorkflowHandle[ReturnType]: (source)

Undocumented

async def _start_nexus_operation_workflow_update(*, temporal_context: _TemporalStartOperationContext, workflow_id: str, update: str | Callable, arg: Any = temporalio.common._arg_unset, args: Sequence[Any] = [], wait_for_stage: temporalio.client.WorkflowUpdateStage, update_id: str | None = None, result_type: type | None = None, rpc_metadata: Mapping[str, str | bytes] = {}, rpc_timeout: timedelta | None = None, run_id: str | None = None, first_execution_run_id: str | None = None) -> temporalio.client.WorkflowUpdateHandle[Any]: (source)

Undocumented

def _try_start_operation_context() -> _TemporalStartOperationContext | None: (source)

Return the active Nexus start-operation context, if any.

_OperationCtxT = (source)

Undocumented

Value
TypeVar('_OperationCtxT',
        bound=OperationContext)
_temporal_cancel_operation_context: ContextVar[_TemporalCancelOperationContext] = (source)

Undocumented

_temporal_nexus_backing_start_context: ContextVar[bool] = (source)

Undocumented

_temporal_operation_signal_slot: ContextVar[_SignalSlot | None] = (source)

Undocumented

_temporal_start_operation_context: ContextVar[_TemporalStartOperationContext] = (source)

Undocumented