ffffng/server/jobs/monitoringMailsSendingJob.js

18 lines
588 B
JavaScript
Raw Normal View History

2016-05-24 23:32:04 +02:00
'use strict';
angular.module('ffffng').factory('MonitoringMailsSendingJob', function (MonitoringService, Logger) {
return {
2016-06-21 14:55:02 +02:00
description: 'Sends monitoring emails depending on the monitoring state of nodes retrieved by the NodeInformationRetrievalJob.',
run: function (callback) {
2016-05-24 23:32:04 +02:00
MonitoringService.sendMonitoringMails(function (err) {
if (err) {
Logger.tag('monitoring', 'mail-sending').error('Error sending monitoring mails:', err);
}
callback();
2016-05-24 23:32:04 +02:00
});
}
};
});