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:
parent
c83bf89a80
commit
8e835fcbb2
5 changed files with 31 additions and 9 deletions
6
db.js
6
db.js
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue