From 0346ec2f45647741cf55109075cf9fe9a70f097e Mon Sep 17 00:00:00 2001 From: Eric Gribkoff Date: Tue, 19 Feb 2019 14:18:00 -0800 Subject: [PATCH] stream_observer->on_next_callback --- src/python/grpcio/grpc/_server.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/python/grpcio/grpc/_server.py b/src/python/grpcio/grpc/_server.py index b58201b79d0..b1b6027ed5a 100644 --- a/src/python/grpcio/grpc/_server.py +++ b/src/python/grpcio/grpc/_server.py @@ -391,11 +391,11 @@ def _call_behavior(rpc_event, behavior, argument, request_deserializer, - stream_observer=None): + on_next_callback=None): context = _Context(rpc_event, state, request_deserializer) try: - if stream_observer is not None: - return behavior(argument, context, stream_observer), True + if on_next_callback is not None: + return behavior(argument, context, on_next_callback), True else: return behavior(argument, context), True except Exception as exception: # pylint: disable=broad-except @@ -530,7 +530,7 @@ def _stream_response_in_pool(rpc_event, state, behavior, argument_thunk, behavior, argument, request_deserializer, - stream_observer=on_next) + on_next_callback=on_next) else: response_iterator, proceed = _call_behavior( rpc_event, state, behavior, argument, request_deserializer) @@ -545,13 +545,13 @@ def _is_rpc_state_active(state): return state.client is not _CANCELLED and not state.statused -def _stream_response_iterator_adapter(rpc_event, state, stream_observer, +def _stream_response_iterator_adapter(rpc_event, state, on_next_callback, response_iterator): while True: response, proceed = _take_response_from_response_iterator( rpc_event, state, response_iterator) if proceed: - stream_observer(response) + on_next_callback(response) if not _is_rpc_state_active(state): break else: