ffffng/server/jobs/nodeInformationCleanupJob.js

18 lines
563 B
JavaScript
Raw Normal View History

'use strict';
angular.module('ffffng').factory('NodeInformationCleanupJob', function (MonitoringService, Logger) {
return {
2016-06-21 14:55:02 +02:00
description: 'Cleanup monitoring status entries for nodes no longer having monitoring enabled.',
run: function (callback) {
MonitoringService.cleanupNodeInformation(function (err) {
if (err) {
Logger.tag('monitoring', 'information-cleanup').error('Error cleaning up node data:', err);
}
callback();
});
}
};
});