def _create_job_endpoint(cls): if cls._use_subprocesses: return cls._start_local_runner_subprocess_job_service() elif cls._use_grpc: # Use GRPC for workers. cls._servicer = LocalJobServicer(use_grpc=True) return 'localhost:%d' % cls._servicer.start_grpc_server() else: # Do not use GRPC for worker. cls._servicer = LocalJobServicer(use_grpc=False) return 'localhost:%d' % cls._servicer.start_grpc_server()
def _create_job_endpoint(cls): if cls._use_subprocesses: return cls._start_local_runner_subprocess_job_service() else: cls._servicer = LocalJobServicer() return 'localhost:%d' % cls._servicer.start_grpc_server()