convert uid mappings to sorted sets

email:uid, username:uid, userslug:uid, fullname:uid all converted to
sorted sets
prevents hitting mongodb document size limit
This commit is contained in:
Barış Soner Uşaklı
2015-05-07 13:43:06 -04:00
parent 073afe4db0
commit c56b30ff60
9 changed files with 120 additions and 69 deletions

View File

@@ -32,7 +32,7 @@ module.exports = function(User) {
async.waterfall([
function(next) {
db.getObjectValues('username:uid', next);
db.getSortedSetRange('username:uid', 0, -1, next);
},
function(uids, next) {
User.getMultipleUserFields(uids, ['uid', 'email', 'username'], next);