mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
Reduces the probability that plinth gives an error 500 because the database is locked. Test performed: 1) Lock the database: > sqlite3 data/var/lib/plinth/plinth.sqlite3 sqlite> PRAGMA locking_mode = EXCLUSIVE; sqlite> BEGIN EXCLUSIVE; 2) Visit plinth/apps/ 3) Only after 30s plinth logs an exception: django.db.utils.OperationalError: database is locked Closes #1786 Related to #1443 Signed-off-by: Veiko Aasa <veiko17@disroot.org> [sunil: Move the timeout value to settings module as it is static] Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>