ffffng/server/jobs/nodeInformationCleanupJob.js
2016-06-21 14:55:02 +02:00

17 lines
563 B
JavaScript

'use strict';
angular.module('ffffng').factory('NodeInformationCleanupJob', function (MonitoringService, Logger) {
return {
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();
});
}
};
});