fix timeouts on category.purge when there are 20k groups

This commit is contained in:
Barış Soner Uşaklı
2017-04-27 16:40:01 -04:00
parent 7a6b685aa0
commit 0b3656f34c
2 changed files with 10 additions and 9 deletions

View File

@@ -58,7 +58,7 @@ module.exports = function (Categories) {
], next);
},
function (next) {
async.each(privileges.privilegeList, function (privilege, next) {
async.eachSeries(privileges.privilegeList, function (privilege, next) {
groups.destroy('cid:' + cid + ':privileges:' + privilege, next);
}, next);
},