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

@@ -14,7 +14,7 @@ module.exports = function(Categories) {
return callback(err);
}
async.each(tids, function(tid, next) {
async.eachLimit(tids, 10, function(tid, next) {
threadTools.purge(tid, 0, next);
}, function(err) {
if (err) {