Added removeInactiveDevices() to maintenance tasks.

This commit is contained in:
Ylian Saint-Hilaire 2021-08-04 11:00:15 -07:00
parent 2281a61e30
commit 994834f57c

1
db.js
View File

@ -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