ffffng/server/jobs/mailQueueJob.js

18 lines
491 B
JavaScript
Raw Normal View History

'use strict';
2016-05-24 16:40:57 +02:00
angular.module('ffffng').factory('MailQueueJob', function (MailService, Logger) {
return {
2016-06-21 14:55:02 +02:00
description: 'Send pending emails (up to 5 attempts in case of failures).',
run: function (callback) {
MailService.sendPendingMails(function (err) {
if (err) {
2016-05-24 16:40:57 +02:00
Logger.tag('mail', 'queue').error('Error sending pending mails:', err);
}
callback();
});
}
};
});