fixed #1488 - emails are processed 100 at a time

v1.18.x
Julian Lam 11 years ago
parent dfe010d97d
commit 590082709f

@ -59,7 +59,7 @@ module.exports = function(User) {
}); });
// Consider using eachLimit, but *only* if people complain about email relays choking -- otherwise we're ok. // Consider using eachLimit, but *only* if people complain about email relays choking -- otherwise we're ok.
async.each(users, function(userObj, next) { async.eachLimit(users, 100, function(userObj, next) {
user.notifications.getDailyUnread(userObj.uid, function(err, notifications) { user.notifications.getDailyUnread(userObj.uid, function(err, notifications) {
// Turn relative URLs into absolute ones // Turn relative URLs into absolute ones
for(var i=0; i<notifications.length; ++i) { for(var i=0; i<notifications.length; ++i) {

Loading…
Cancel
Save