Пример #1
0
def _setUserDatas(userId, datas):
    dataKey = UserDataSchema.mkey(userId)
    params = UserDataSchema.paramsDict2List(datas)
    ret = daobase.executeUserCmd(userId, 'HMSET', dataKey, *params)
    if _CACHE_USER_ENABLE:
        _cacheUser.update_group_dict_data(userId, dataKey, datas)
    return ret
Пример #2
0
def _setUserDatasForce(userId, datas):
    dataKey = UserDataSchema.mkey(userId)
    params = UserDataSchema.paramsDict2List(datas, 0)
    ret = daobase.executeUserLua(userId, user_scripts.MAIN_SET_HASH_DATA_FORCE, 2, dataKey, json.dumps(params))
    if _CACHE_USER_ENABLE:
        _cacheUser.update_group_dict_data(userId, dataKey, datas)
    return ret
Пример #3
0
def _setUserDatas(userId, datas):
    dataKey = UserDataSchema.mkey(userId)
    params = UserDataSchema.paramsDict2List(datas)
    ret = daobase.executeUserCmd(userId, 'HMSET', dataKey, *params)
    return ret
Пример #4
0
def _setUserDatasForce(userId, datas):
    dataKey = UserDataSchema.mkey(userId)
    params = UserDataSchema.paramsDict2List(datas, 0)
    ret = daobase.executeUserLua(userId, user_scripts.MAIN_SET_HASH_DATA_FORCE,
                                 2, dataKey, json.dumps(params))
    return ret