1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

DB record expire in config + Mesh folder optimizations

This commit is contained in:
Ylian Saint-Hilaire 2019-02-18 22:20:25 -08:00
parent c83bf89a80
commit 8e835fcbb2
5 changed files with 31 additions and 9 deletions

6
db.js
View file

@ -35,6 +35,12 @@ module.exports.CreateDB = function (parent) {
obj.identifier = null;
obj.dbKey = null;
// Read expiration time from configuration file
if (typeof obj.parent.args.dbexpire == 'object') {
if (typeof obj.parent.args.dbexpire.events == 'number') { expireEventsSeconds = obj.parent.args.dbexpire.events; }
if (typeof obj.parent.args.dbexpire.powerevents == 'number') { expirePowerEventsSeconds = obj.parent.args.dbexpire.powerevents; }
}
if (obj.parent.args.mongodb) {
// Use MongoDB
obj.databaseType = 2;