class _NexusWorker: (source)
Constructor: _NexusWorker(bridge_worker, client, task_queue, service_handlers, ...)
Undocumented
Method | __init__ |
Undocumented |
Async Method | drain |
Undocumented |
Async Method | run |
Continually poll for Nexus tasks and dispatch to handlers. |
Async Method | wait |
Undocumented |
Async Method | _handle |
Handle a cancel operation task. |
Async Method | _handle |
Handle a start operation task. |
Async Method | _handler |
Serialize handler_error as a Nexus HandlerError proto. |
Async Method | _nexus |
Serialize error as a Nexus Failure proto. |
Async Method | _operation |
Undocumented |
Async Method | _start |
Invoke the Nexus handler's start_operation method and construct the StartOperationResponse. |
Instance Variable | _bridge |
Undocumented |
Instance Variable | _client |
Undocumented |
Instance Variable | _data |
Undocumented |
Instance Variable | _fail |
Undocumented |
Instance Variable | _handler |
Undocumented |
Instance Variable | _interceptors |
Undocumented |
Instance Variable | _metric |
Undocumented |
Instance Variable | _running |
Undocumented |
Instance Variable | _task |
Undocumented |
Callable[ [], temporalio.bridge.worker.Worker]
, client: temporalio.client.Client
, task_queue: str
, service_handlers: Sequence[ Any]
, data_converter: temporalio.converter.DataConverter
, interceptors: Sequence[ Interceptor]
, metric_meter: temporalio.common.MetricMeter
, executor: concurrent.futures.Executor | None
):
(source)
¶
Undocumented
bytes
, request: temporalio.api.nexus.v1.CancelOperationRequest
, headers: Mapping[ str, str]
):
(source)
¶
Handle a cancel operation task.
Attempt to execute the user cancel_operation method. Handle errors and send the task completion.
bytes
, start_request: temporalio.api.nexus.v1.StartOperationRequest
, headers: Mapping[ str, str]
):
(source)
¶
Handle a start operation task.
Attempt to execute the user start_operation method and invoke the data converter on the result. Handle errors and send the task completion.
nexusrpc.HandlerError
) -> temporalio.api.nexus.v1.HandlerError
:
(source)
¶
Serialize handler_error as a Nexus HandlerError proto.
nexusrpc.HandlerError | nexusrpc.OperationError
) -> temporalio.api.nexus.v1.Failure
:
(source)
¶
Serialize error as a Nexus Failure proto.
The Nexus Failure represents the top-level error. If there is a cause chain attached to the exception, then serialize it as the details.
Notice that any stack trace attached to error itself is not included in the result.
See https://github.com/nexus-rpc/api/blob/main/SPEC.md#failure
nexusrpc.OperationError
) -> temporalio.api.nexus.v1.UnsuccessfulOperationError
:
(source)
¶
Undocumented
temporalio.api.nexus.v1.StartOperationRequest
, headers: Mapping[ str, str]
) -> temporalio.api.nexus.v1.StartOperationResponse
:
(source)
¶
Invoke the Nexus handler's start_operation method and construct the StartOperationResponse.
OperationError is handled by this function, since it results in a StartOperationResponse.
All other exceptions are handled by a caller of this function.