cleanup eventlog more aggressively

Those login entries are really adding up on old cloudrons
This commit is contained in:
Girish Ramakrishnan
2018-03-22 20:26:45 -07:00
parent f498443cae
commit 26d4a11c44
3 changed files with 6 additions and 20 deletions

View File

@@ -121,14 +121,7 @@ function cleanup(callback) {
var d = new Date();
d.setDate(d.getDate() - 10); // 10 days ago
// only cleanup high frequency events
var actions = [
exports.ACTION_USER_LOGIN,
exports.ACTION_BACKUP_START,
exports.ACTION_BACKUP_FINISH
];
eventlogdb.delByCreationTime(d, actions, function (error) {
eventlogdb.delByCreationTime(d, function (error) {
if (error) return callback(new EventLogError(EventLogError.INTERNAL_ERROR, error));
callback(null);