Set DB mode to NORMAL synchronous level

This commit is contained in:
Nick Mowen 2023-06-06 08:08:22 -06:00
parent bfbe99bc65
commit 183b1e7126
2 changed files with 3 additions and 1 deletions

View File

@ -209,7 +209,8 @@ class FrigateApp:
self.config.database.path, self.config.database.path,
pragmas={ pragmas={
"auto_vacuum": "FULL", # Does not defragment database "auto_vacuum": "FULL", # Does not defragment database
"cache_size": -512 * 1000, # 512MB of cache "cache_size": -512 * 1000, # 512MB of cache,
'synchronous': 'NORMAL', # Safe when using WAL https://www.sqlite.org/pragma.html#pragma_synchronous
}, },
timeout=60, timeout=60,
) )

View File

@ -42,6 +42,7 @@ def manage_recordings(
pragmas={ pragmas={
"auto_vacuum": "FULL", # Does not defragment database "auto_vacuum": "FULL", # Does not defragment database
"cache_size": -512 * 1000, # 512MB of cache "cache_size": -512 * 1000, # 512MB of cache
'synchronous': 'NORMAL', # Safe when using WAL https://www.sqlite.org/pragma.html#pragma_synchronous
}, },
timeout=60, timeout=60,
) )