speed up category purge

using eachLimit
dont emit stats on every topic delete
This commit is contained in:
barisusakli
2014-06-21 22:11:44 -04:00
parent dceeed22f7
commit a4d4e53f45
6 changed files with 53 additions and 38 deletions

View File

@@ -133,6 +133,12 @@ module.exports = function(Posts) {
async.each(results.downvoters, function(uid, next) {
db.sortedSetRemove('uid:' + uid + ':downvote', pid, next);
}, next);
},
function(next) {
db.delete('pid:' + pid + ':upvote', next);
},
function(next) {
db.delete('pid:' + pid + ':downvote', next);
}
], callback);
});