From a954d965bba60a3f2b76443cc6bf92c6d3642246 Mon Sep 17 00:00:00 2001 From: Sanjeev Kulkarni Date: Tue, 30 Jan 2018 18:01:36 -0800 Subject: [PATCH] Since server is already module name, rename the variable (#185) --- pulsar-functions/runtime/src/main/python/server.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pulsar-functions/runtime/src/main/python/server.py b/pulsar-functions/runtime/src/main/python/server.py index f507e10ee5c68..963f4cf01ef32 100644 --- a/pulsar-functions/runtime/src/main/python/server.py +++ b/pulsar-functions/runtime/src/main/python/server.py @@ -62,10 +62,10 @@ def GetAndResetMetrics(self, request, context): def serve(port, pyinstance): - server = grpc.server(futures.ThreadPoolExecutor(max_workers=10)) + server_instance = grpc.server(futures.ThreadPoolExecutor(max_workers=10)) InstanceCommunication_pb2_grpc.add_InstanceControlServicer_to_server( - InstanceCommunicationServicer(pyinstance), server) - server.add_insecure_port('[::]:%d' % port) + InstanceCommunicationServicer(pyinstance), server_instance) + server_instance.add_insecure_port('[::]:%d' % port) Log.info("Serving InstanceCommunication on port %d" % int(port)) - server.start() - return server + server_instance.start() + return server_instance