From 994834f57c00793d4ec68cb5d9e92ad18d94313b Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Wed, 4 Aug 2021 11:00:15 -0700 Subject: [PATCH] Added removeInactiveDevices() to maintenance tasks. --- db.js | 1 + 1 file changed, 1 insertion(+) diff --git a/db.js b/db.js index bee66b06..a6c333de 100644 --- a/db.js +++ b/db.js @@ -110,6 +110,7 @@ module.exports.CreateDB = function (parent, func) { obj.powerfile.remove({ time: { '$lt': new Date(Date.now() - (expirePowerEventsSeconds * 1000)) } }, { multi: true }); // Force delete older events obj.serverstatsfile.remove({ time: { '$lt': new Date(Date.now() - (expireServerStatsSeconds * 1000)) } }, { multi: true }); // Force delete older events } + obj.removeInactiveDevices(); } // Remove inactive devices