From 5d8bcc0c38ff90af7472009c60e949f6c1b29793 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Mon, 5 Jun 2023 16:57:24 -0600 Subject: [PATCH] Enable auto vacuums --- frigate/app.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frigate/app.py b/frigate/app.py index 2db8728b2..059bc5ad7 100644 --- a/frigate/app.py +++ b/frigate/app.py @@ -205,7 +205,10 @@ class FrigateApp: def bind_database(self) -> None: """Bind db to the main process.""" # NOTE: all db accessing processes need to be created before the db can be bound to the main process - self.db = SqliteQueueDatabase(self.config.database.path) + self.db = SqliteQueueDatabase( + self.config.database.path, + pragmas={'auto_vacuum', 'FULL'}, # Does not defragment database + ) models = [Event, Recordings, Timeline] self.db.bind(models)