Skip to content

Node.js based forum software built for the modern web

fixed #1488 - emails are processed 100 at a time

Julian Lam590082709fb7
diff --git a/src/user/jobs.js b/src/user/jobs.js
index c2e88e752f..2655b96a67 100644
--- a/src/user/jobs.js
+++ b/src/user/jobs.js
@@ -59,7 +59,7 @@ module.exports = function(User) {
});
// 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) {
// Turn relative URLs into absolute ones
for(var i=0; i<notifications.length; ++i) {