From 6f0c00bb9ff89a3e3d79340abb28ea814bf93f53 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Wed, 1 Jun 2016 08:42:37 -0400 Subject: [PATCH] use eachSeries instead --- src/upgrade.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/upgrade.js b/src/upgrade.js index 65f62059de..0f863c757c 100644 --- a/src/upgrade.js +++ b/src/upgrade.js @@ -513,7 +513,7 @@ Upgrade.upgrade = function(callback) { async.waterfall([ function(next) { - async.each(groups, function(group, next) { + async.eachSeries(groups, function(group, next) { if (group.privileges['groups:read']) { return groupsAPI.join('cid:' + cid + ':privileges:groups:topics:read', group.name, function(err) { if (!err) { @@ -528,7 +528,7 @@ Upgrade.upgrade = function(callback) { }, next); }, function(next) { - async.each(users, function(user, next) { + async.eachSeries(users, function(user, next) { if (user.privileges['read']) { return groupsAPI.join('cid:' + cid + ':privileges:topics:read', user.uid, function(err) { if (!err) {