Improved DbExpire in sample-config.json.
Ylian Saint-Hilaire committed
Mar 16, 2020 at 13:30 UTC
e916836f0a56a9dc087393fbe87d35185953b460
2 files changed
+6
-4
db.js
+3
-3
@@ -28,9 +28,9 @@
28
module.exports.CreateDB = function (parent, func) {
29
var obj = {};
30
var Datastore = null;
31
- var expireEventsSeconds = (60 * 60 * 24 * 20); // By default, expire events after 20 days. (Seconds * Minutes * Hours * Days)
32
- var expirePowerEventsSeconds = (60 * 60 * 24 * 10); // By default, expire power events after 10 days. (Seconds * Minutes * Hours * Days)
33
- var expireServerStatsSeconds = (60 * 60 * 24 * 30); // By default, expire power events after 30 days. (Seconds * Minutes * Hours * Days)
31
+ var expireEventsSeconds = (60 * 60 * 24 * 20); // By default, expire events after 20 days (1728000). (Seconds * Minutes * Hours * Days)
32
+ var expirePowerEventsSeconds = (60 * 60 * 24 * 10); // By default, expire power events after 10 days (864000). (Seconds * Minutes * Hours * Days)
33
+ var expireServerStatsSeconds = (60 * 60 * 24 * 30); // By default, expire power events after 30 days (2592000). (Seconds * Minutes * Hours * Days)
34
const common = require('./common.js');
35
obj.identifier = null;
36
obj.dbKey = null;
sample-config.json
+3
-1
@@ -15,9 +15,11 @@
15
"_DbEncryptKey": "MyReallySecretPassword2",
16
"_DbRecordsEncryptKey": "MyReallySecretPassword",
17
"_DbRecordsDecryptKey": "MyReallySecretPassword",
18
+ "__DbExpire": "Amount of time to keep various events in the database, in seconds. Below are the default values.",
19
"_DbExpire": {
20
"events": 1728000,
20
- "powerevents": 864000
21
+ "powerevents": 864000,
22
+ "statsevents": 2592000
23
},
24
"_Port": 443,
25
"_AliasPort": 444,