Configurable offline time, after which nodes are automatically deleted

This commit is contained in:
rubo77 2016-08-19 01:27:17 +02:00
commit b283744749
4 changed files with 10 additions and 10 deletions

View file

@ -27,10 +27,6 @@ angular.module('ffffng')
2: { amount: 1, unit: 'days' },
3: { amount: 7, unit: 'days' }
};
var DELETE_OFFLINE_NODES_AFTER_DURATION = {
amount: 100,
unit: 'days'
};
var previousImportTimestamp = null;
@ -672,8 +668,7 @@ angular.module('ffffng')
.tag('nodes', 'delete-offline')
.info(
'Deleting offline nodes older than ' +
DELETE_OFFLINE_NODES_AFTER_DURATION.amount + ' ' +
DELETE_OFFLINE_NODES_AFTER_DURATION.unit
config.server.pruneTime + ' days'
);
Database.all(
@ -681,8 +676,8 @@ angular.module('ffffng')
[
'OFFLINE',
moment().subtract(
DELETE_OFFLINE_NODES_AFTER_DURATION.amount,
DELETE_OFFLINE_NODES_AFTER_DURATION.unit
config.server.pruneTime * 86400,
"seconds" // use seconds, so decimal values are possible for days
).unix()
],
function (err, rows) {