ffffng/server/jobs/MailQueueJob.js

19 lines
462 B
JavaScript
Raw Normal View History

2018-12-17 22:49:54 +01:00
'use strict';
const Logger = require('../logger')
const MailService = require('../services/mailService')
module.exports = {
description: 'Send pending emails (up to 5 attempts in case of failures).',
run: function (callback) {
MailService.sendPendingMails(function (err) {
if (err) {
Logger.tag('mail', 'queue').error('Error sending pending mails:', err);
}
callback();
});
}
}