From e916836f0a56a9dc087393fbe87d35185953b460 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Mon, 16 Mar 2020 13:30:12 -0700 Subject: [PATCH] Improved DbExpire in sample-config.json. --- db.js | 6 +++--- sample-config.json | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/db.js b/db.js index 2ba00c5b..ea3fb25d 100644 --- a/db.js +++ b/db.js @@ -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; diff --git a/sample-config.json b/sample-config.json index 4133ee89..b3f5737d 100644 --- a/sample-config.json +++ b/sample-config.json @@ -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,