def _connect_to_resource_server()

in mft_backend/resource_service/ClientStub.py [0:0]


    def _connect_to_resource_server():
        # TODO: once TLS is enabled in server change this
        channel = grpc.insecure_channel('localhost:9093')
        try:
            grpc.channel_ready_future(channel).result(timeout=10)
        except grpc.FutureTimeoutError:
            sys.exit('Error connecting to server')
        else:
            stub = ResourceService_pb2_grpc.ResourceServiceStub(channel)
            return stub