Esempio n. 1
0
def get_ums(uid):
    channel = grpc.insecure_channel('127.0.0.1:8910')
    stub = um_pb2_grpc.UMServiceStub(channel)
    request = um_pb2.UserModelRequest()
    request.user_id = str(uid)
    response = stub.um_call(request)
    return response
Esempio n. 2
0
def get_ums(uid):
    channel = grpc.insecure_channel('127.0.0.1:8910')
    stub = um_pb2_grpc.UMServiceStub(channel)
    response = stub.um_call(
        um_pb2.UserModelRequest(user_id=str(uid).encode(encoding='utf-8')))
    return response