|
|
|
@ -125,7 +125,7 @@ cdef class _AioCall(GrpcCallWrapper): |
|
|
|
|
if credentials is not None: |
|
|
|
|
set_credentials_error = grpc_call_set_credentials(self.call, credentials.c()) |
|
|
|
|
if set_credentials_error != GRPC_CALL_OK: |
|
|
|
|
raise RuntimeError("Credentials couldn't have been set") |
|
|
|
|
raise RuntimeError(f"Credentials couldn't have been set: {set_credentials_error}") |
|
|
|
|
|
|
|
|
|
grpc_slice_unref(method_slice) |
|
|
|
|
|
|
|
|
@ -209,7 +209,7 @@ cdef class _AioCall(GrpcCallWrapper): |
|
|
|
|
|
|
|
|
|
def done(self): |
|
|
|
|
"""Returns if the RPC call has finished. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Checks if the status has been provided, either |
|
|
|
|
because the RPC finished or because was cancelled.. |
|
|
|
|
|
|
|
|
@ -220,7 +220,7 @@ cdef class _AioCall(GrpcCallWrapper): |
|
|
|
|
|
|
|
|
|
def cancelled(self): |
|
|
|
|
"""Returns if the RPC was cancelled. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Returns: |
|
|
|
|
True if the RPC was cancelled. |
|
|
|
|
""" |
|
|
|
@ -231,7 +231,7 @@ cdef class _AioCall(GrpcCallWrapper): |
|
|
|
|
|
|
|
|
|
async def status(self): |
|
|
|
|
"""Returns the status of the RPC call. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
It returns the finshed status of the RPC. If the RPC |
|
|
|
|
has not finished yet this function will wait until the RPC |
|
|
|
|
gets finished. |
|
|
|
@ -254,7 +254,7 @@ cdef class _AioCall(GrpcCallWrapper): |
|
|
|
|
|
|
|
|
|
async def initial_metadata(self): |
|
|
|
|
"""Returns the initial metadata of the RPC call. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
If the initial metadata has not been received yet this function will |
|
|
|
|
wait until the RPC gets finished. |
|
|
|
|
|
|
|
|
@ -420,7 +420,7 @@ cdef class _AioCall(GrpcCallWrapper): |
|
|
|
|
tuple outbound_initial_metadata, |
|
|
|
|
object metadata_sent_observer): |
|
|
|
|
"""Actual implementation of the complete unary-stream call. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Needs to pay extra attention to the raise mechanism. If we want to |
|
|
|
|
propagate the final status exception, then we have to raise it. |
|
|
|
|
Othersize, it would end normally and raise `StopAsyncIteration()`. |
|
|
|
@ -490,7 +490,7 @@ cdef class _AioCall(GrpcCallWrapper): |
|
|
|
|
outbound_initial_metadata, |
|
|
|
|
self._send_initial_metadata_flags, |
|
|
|
|
self._loop) |
|
|
|
|
# Notify upper level that sending messages are allowed now. |
|
|
|
|
# Notify upper level that sending messages are allowed now. |
|
|
|
|
metadata_sent_observer() |
|
|
|
|
|
|
|
|
|
# Receives initial metadata. |
|
|
|
|