mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-11 08:25:46 +01:00
use processSortedSet instead of getting all users
This commit is contained in:
@@ -34,11 +34,7 @@ module.exports = function(User) {
|
||||
}
|
||||
|
||||
function deleteSortedSetElements(set, deleteMethod, callback) {
|
||||
batch.processSortedSet(set, function(err, ids, next) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
batch.processSortedSet(set, function(ids, next) {
|
||||
async.eachLimit(ids, 10, deleteMethod, next);
|
||||
}, {alwaysStartAt: 0}, callback);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user