From 243fcd8ca6f758bd7b59a70f170bc4796df4e928 Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Tue, 9 Apr 2019 21:32:16 +0200 Subject: [PATCH] Run MongoDB compaction on startup --- config.py | 1 + 1 file changed, 1 insertion(+) diff --git a/config.py b/config.py index 846ae79..3be15f2 100644 --- a/config.py +++ b/config.py @@ -103,6 +103,7 @@ MEDIA_CACHE = MediaCache(GRIDFS, USER_AGENT) def create_indexes(): + DB.command("compact", "activities") DB.activities.create_index([("remote_id", pymongo.ASCENDING)]) DB.activities.create_index([("activity.object.id", pymongo.ASCENDING)]) DB.activities.create_index(