ffffng/server/jobs/OfflineNodesDeletionJob.js

19 lines
488 B
JavaScript
Raw Permalink Normal View History

2018-12-17 22:49:54 +01:00
'use strict';
const Logger = require('../logger')
const MonitoringService = require('../services/monitoringService')
module.exports = {
description: 'Delete nodes that are offline for more than 100 days.',
run: function (callback) {
MonitoringService.deleteOfflineNodes(function (err) {
if (err) {
Logger.tag('nodes', 'delete-offline').error('Error deleting offline nodes:', err);
}
callback();
});
}
}