mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-10 21:25:24 +03:00
formatting
This commit is contained in:
parent
e028358587
commit
ed15b66540
@ -41,7 +41,7 @@ AUDIO_MIN_CONFIDENCE = 0.5
|
|||||||
|
|
||||||
# DB Consts
|
# DB Consts
|
||||||
|
|
||||||
MAX_WAL_SIZE = 20 # MB
|
MAX_WAL_SIZE = 20 # MB
|
||||||
|
|
||||||
# Ffmpeg Presets
|
# Ffmpeg Presets
|
||||||
|
|
||||||
|
|||||||
@ -46,7 +46,9 @@ class RecordingCleanup(threading.Thread):
|
|||||||
|
|
||||||
# with auto checkpoint most users should never hit this
|
# with auto checkpoint most users should never hit this
|
||||||
|
|
||||||
if (os.stat(f"{self.config.database.path}-wal").st_size / (1024 * 1024)) > MAX_WAL_SIZE:
|
if (
|
||||||
|
os.stat(f"{self.config.database.path}-wal").st_size / (1024 * 1024)
|
||||||
|
) > MAX_WAL_SIZE:
|
||||||
db = SqliteExtDatabase(self.config.database.path)
|
db = SqliteExtDatabase(self.config.database.path)
|
||||||
db.execute_sql("PRAGMA wal_checkpoint(TRUNCATE);")
|
db.execute_sql("PRAGMA wal_checkpoint(TRUNCATE);")
|
||||||
db.close()
|
db.close()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user