On Monday, October 2, 2017 at 11:07:11 PM UTC+11, Mehrdad Afshari wrote:
>
> I've submitted a gRFC for supporting client and server interceptors in
> Python:
>
> https://github.com/grpc/proposal/pull/39
>
> Implementation: https://github.com/grpc/grpc/pull/12778
>
> Feedback is appreciated. Per the gRFC process, please keep discussion in
> this thread.
>
Could we add the order of execution of the interceptors to the proposal?
(Not sure if that makes sense for this document). As per the proposed
implementation, there's a comment saying that the interceptors are given
control in the order they are listed when calling `intercept_server()`.
However, when i tried to verify this behavior via:
diff --git a/demo2/grpc-services/grpc_interceptors/_interceptor.py
b/demo2/grpc-services/grpc_interceptors/_interceptor.py
index c63b065..bb33b0b 100644
--- a/demo2/grpc-services/grpc_interceptors/_interceptor.py
+++ b/demo2/grpc-services/grpc_interceptors/_interceptor.py
@@ -228,6 +228,7 @@ class
_InterceptingRpcMethodHandler(grpc.RpcMethodHandler):
return self._rpc_method_handler.unary_unary
def adaptation(request, servicer_context):
+ print(self._interceptor)
When I make a `unary_unary` call, this prints the _interceptor object in
the reverse order they were specified when registering them with the server.
--
You received this message because you are subscribed to the Google Groups
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit
https://groups.google.com/d/msgid/grpc-io/9b171454-224b-47ea-b5a8-ce5ca6c9a267%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.