Esempio n. 1
0
 def wrapper(self, *args, **kwargs):
     try:
         return func(self, *args, **kwargs)
     except exc:
         raise protocol.WebRpcError(
             grpc.StatusCode.DEADLINE_EXCEEDED,
             "request timed out at the client",
         )
Esempio n. 2
0
 async def wrapper(self, *args, **kwargs):
     try:
         async for result in func(self, *args, **kwargs):
             yield result
     except exc:
         raise protocol.WebRpcError(
             grpc.StatusCode.DEADLINE_EXCEEDED,
             "request timed out at the client",
         )