Job to clean up outdated monitoring data.

This commit is contained in:
baldo 2016-05-24 20:39:51 +02:00
parent b84bfb5c99
commit e03be8bf51
3 changed files with 36 additions and 1 deletions

View file

@ -0,0 +1,13 @@
'use strict';
angular.module('ffffng').factory('NodeInformationCleanupJob', function (MonitoringService, Logger) {
return {
run: function () {
MonitoringService.cleanupNodeInformation(function (err) {
if (err) {
Logger.tag('monitoring', 'information-cleanup').error('Error cleaning up node data:', err);
}
});
}
};
});

View file

@ -32,7 +32,7 @@ angular.module('ffffng').factory('Scheduler', function ($injector, Logger, confi
if (config.client.monitoring.enabled) {
schedule('30 */5 * * * *', 'NodeInformationRetrievalJob');
// schedule('0 */1 * * * *', 'NodeInformationCleanupJob');
schedule('0 0 3 * * *', 'NodeInformationCleanupJob'); // every night at 3:00
}
}
catch (error) {