ffffng/server/jobs/nodeInformationRetrievalJob.js

18 lines
588 B
JavaScript
Raw Normal View History

'use strict';
2016-05-24 16:40:57 +02:00
angular.module('ffffng').factory('NodeInformationRetrievalJob', function (MonitoringService, Logger) {
return {
description: 'Fetches the nodes.json and calculates and stores the monitoring / online status for registered nodes.',
2016-06-21 14:55:02 +02:00
run: function (callback) {
MonitoringService.retrieveNodeInformation(function (err) {
if (err) {
2016-05-24 16:40:57 +02:00
Logger.tag('monitoring', 'information-retrieval').error('Error retrieving node data:', err);
}
callback();
});
}
};
});