mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-25 00:39:58 +01:00
fix: update usage of emailer.send to not catch (as errors are no longer thrown), email error throttler
This commit is contained in:
@@ -103,7 +103,6 @@ Digest.send = async function (data) {
|
||||
if (!data || !data.subscribers || !data.subscribers.length) {
|
||||
return emailsSent;
|
||||
}
|
||||
let errorLogged = false;
|
||||
await batch.processArray(data.subscribers, async (uids) => {
|
||||
let userData = await user.getUsersFields(uids, ['uid', 'email', 'email:confirmed', 'username', 'userslug', 'lastonline']);
|
||||
userData = userData.filter(u => u && u.email && (meta.config.includeUnverifiedEmails || u['email:confirmed']));
|
||||
@@ -142,11 +141,6 @@ Digest.send = async function (data) {
|
||||
popularTopics: topics.popular,
|
||||
interval: data.interval,
|
||||
showUnsubscribe: true,
|
||||
}).catch((err) => {
|
||||
if (!errorLogged) {
|
||||
winston.error(`[user/jobs] Could not send digest email\n[emailer.send] ${err.stack}`);
|
||||
errorLogged = true;
|
||||
}
|
||||
});
|
||||
}));
|
||||
if (data.interval !== 'alltime') {
|
||||
|
||||
Reference in New Issue
Block a user