use processSortedSet instead of getting all users

This commit is contained in:
barisusakli
2014-10-26 20:10:57 -04:00
parent 782896997d
commit c4a39c8163
5 changed files with 34 additions and 46 deletions

View File

@@ -72,7 +72,7 @@ var winston = require('winston'),
}
ThreadTools.purge = function(tid, uid, callback) {
batch.processSortedSet('tid:' + tid + ':posts', function(err, pids, next) {
batch.processSortedSet('tid:' + tid + ':posts', function(pids, next) {
async.eachLimit(pids, 10, posts.purge, next);
}, {alwaysStartAt: 0}, function(err) {
if (err) {