2016-05-24 20:39:51 +02:00
|
|
|
'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.',
|
|
|
|
|
2016-06-03 23:42:17 +02:00
|
|
|
run: function (callback) {
|
2016-05-24 20:39:51 +02:00
|
|
|
MonitoringService.cleanupNodeInformation(function (err) {
|
|
|
|
if (err) {
|
|
|
|
Logger.tag('monitoring', 'information-cleanup').error('Error cleaning up node data:', err);
|
|
|
|
}
|
2016-06-03 23:42:17 +02:00
|
|
|
|
|
|
|
callback();
|
2016-05-24 20:39:51 +02:00
|
|
|
});
|
|
|
|
}
|
|
|
|
};
|
|
|
|
});
|