class documentation
class NexusOperationHandle(Generic[
Constructor: NexusOperationHandle(client, operation_id, run_id, result_type, ...)
Handle representing a standalone Nexus operation execution.
Warning
This API is experimental and unstable.
| Method | __init__ |
Create nexus operation handle. |
| Async Method | cancel |
Request cancellation of the Nexus operation. |
| Async Method | describe |
Describe the Nexus operation execution. |
| Async Method | result |
Wait for result of the Nexus operation. |
| Async Method | terminate |
Terminate the Nexus operation execution immediately. |
| Property | endpoint |
Endpoint name. |
| Property | operation |
ID of the operation. |
| Property | run |
Run ID of the operation. |
| Property | service |
Service name. |
| Instance Variable | _client |
Undocumented |
| Instance Variable | _endpoint |
Undocumented |
| Instance Variable | _known |
Undocumented |
| Instance Variable | _operation |
Undocumented |
| Instance Variable | _result |
Undocumented |
| Instance Variable | _run |
Undocumented |
| Instance Variable | _service |
Undocumented |
def __init__(self, client:
Client, operation_id: str, *, run_id: str | None = None, result_type: type | None = None, endpoint: str = '', service: str = ''):
(source)
¶
Create nexus operation handle.
async def describe(self, *, rpc_metadata:
Mapping[ str, str | bytes] = {}, rpc_timeout: timedelta | None = None) -> NexusOperationExecutionDescription:
(source)
¶
Describe the Nexus operation execution.
Warning
This API is experimental and unstable.
| Parameters | |
rpcMapping[ | Headers used on the RPC call. |
rpctimedelta | None | Optional RPC deadline to set for the RPC call. |
| Returns | |
NexusOperationExecutionDescription | Nexus operation execution description. |
async def result(self, *, rpc_metadata:
Mapping[ str, str | bytes] = {}, rpc_timeout: timedelta | None = None) -> ReturnType:
(source)
¶
Wait for result of the Nexus operation.
Warning
This API is experimental and unstable.
The result may already be known if this method has been called before, in which case no network call is made. Otherwise the result will be polled for until it is available.
| Parameters | |
rpcMapping[ | Headers used on the RPC call. Keys here override client-level RPC metadata keys. |
rpctimedelta | None | Optional RPC deadline to set for each RPC call. Note: this is the timeout for each RPC call while polling, not a timeout for the function as a whole. If an individual RPC times out, it will be retried until the result is available. |
| Returns | |
ReturnType | The result of the operation. |
| Raises | |
NexusOperationFailureError | If the operation completed with a failure. |
RPCError | Operation result could not be fetched for some reason. |