Ensure db timeout is at least 60

This commit is contained in:
Nicolas Mowen 2023-07-19 14:05:14 -06:00 committed by GitHub
parent 605295bc1b
commit b155b128a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,7 +45,7 @@ def manage_recordings(
"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 "synchronous": "NORMAL", # Safe when using WAL https://www.sqlite.org/pragma.html#pragma_synchronous
}, },
timeout=10 * len([c for c in config.cameras.values() if c.enabled]), timeout=max(60, 10 * len([c for c in config.cameras.values() if c.enabled])),
) )
models = [Event, Recordings, Timeline, RecordingsToDelete] models = [Event, Recordings, Timeline, RecordingsToDelete]
db.bind(models) db.bind(models)