mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-16 02:36:16 +01:00
use processSortedSet instead of getting all users
This commit is contained in:
@@ -9,11 +9,7 @@ var async = require('async'),
|
||||
module.exports = function(Categories) {
|
||||
|
||||
Categories.purge = function(cid, callback) {
|
||||
batch.processSortedSet('categories:' + cid + ':tid', function(err, tids, next) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
batch.processSortedSet('categories:' + cid + ':tid', function(tids, next) {
|
||||
async.eachLimit(tids, 10, function(tid, next) {
|
||||
threadTools.purge(tid, 0, next);
|
||||
}, next);
|
||||
|
||||
Reference in New Issue
Block a user