Improved DbExpire in sample-config.json.

This commit is contained in:
Ylian Saint-Hilaire 2020-03-16 13:30:12 -07:00
parent eb0765902b
commit e916836f0a
2 changed files with 6 additions and 4 deletions

6
db.js
View File

@ -28,9 +28,9 @@
module.exports.CreateDB = function (parent, func) {
var obj = {};
var Datastore = null;
var expireEventsSeconds = (60 * 60 * 24 * 20); // By default, expire events after 20 days. (Seconds * Minutes * Hours * Days)
var expirePowerEventsSeconds = (60 * 60 * 24 * 10); // By default, expire power events after 10 days. (Seconds * Minutes * Hours * Days)
var expireServerStatsSeconds = (60 * 60 * 24 * 30); // By default, expire power events after 30 days. (Seconds * Minutes * Hours * Days)
var expireEventsSeconds = (60 * 60 * 24 * 20); // By default, expire events after 20 days (1728000). (Seconds * Minutes * Hours * Days)
var expirePowerEventsSeconds = (60 * 60 * 24 * 10); // By default, expire power events after 10 days (864000). (Seconds * Minutes * Hours * Days)
var expireServerStatsSeconds = (60 * 60 * 24 * 30); // By default, expire power events after 30 days (2592000). (Seconds * Minutes * Hours * Days)
const common = require('./common.js');
obj.identifier = null;
obj.dbKey = null;

View File

@ -15,9 +15,11 @@
"_DbEncryptKey": "MyReallySecretPassword2",
"_DbRecordsEncryptKey": "MyReallySecretPassword",
"_DbRecordsDecryptKey": "MyReallySecretPassword",
"__DbExpire": "Amount of time to keep various events in the database, in seconds. Below are the default values.",
"_DbExpire": {
"events": 1728000,
"powerevents": 864000
"powerevents": 864000,
"statsevents": 2592000
},
"_Port": 443,
"_AliasPort": 444,