From fb4b4513665c73763e27f19f3c04e842d9afbb3f Mon Sep 17 00:00:00 2001 From: nero120 Date: Sun, 30 Dec 2018 22:18:07 +0000 Subject: [PATCH] Updated mongodb config script to include TTL index to remove stale syncs. --- mongoconfig.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mongoconfig.js b/mongoconfig.js index 3bb7d2c..c6b8cf3 100644 --- a/mongoconfig.js +++ b/mongoconfig.js @@ -1,2 +1,3 @@ db.newsynclogs.createIndex( { "expiresAt": 1 }, { expireAfterSeconds: 0 } ); -db.newsynclogs.createIndex( { "ipAddress": 1 } ); \ No newline at end of file +db.newsynclogs.createIndex( { "ipAddress": 1 } ); +db.bookmarks.createIndex( { "lastAccessed": 1 }, { expireAfterSeconds: 21*86400 } ); \ No newline at end of file