[Toaster] [review-request][PATCH] bitbake: toastermain: Add a longer default database timeout
Michael Wood
michael.g.wood at intel.com
Thu Jul 30 06:18:40 PDT 2015
When using sqlite we sometimes see Database Locked exceptions when we
fire off database calls asynchronously from the UI. We need sqlite to
wait a bit longer for the lock to be released.
n.b In production setup we hopefully wouldn't be using sqlite.
docs.djangoproject.com/en/1.6/ref/databases/#database-is-locked-errors
Signed-off-by: Michael Wood <michael.g.wood at intel.com>
---
bitbake/lib/toaster/toastermain/settings.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/bitbake/lib/toaster/toastermain/settings.py b/bitbake/lib/toaster/toastermain/settings.py
index c72a904..ca32665 100644
--- a/bitbake/lib/toaster/toastermain/settings.py
+++ b/bitbake/lib/toaster/toastermain/settings.py
@@ -46,6 +46,13 @@ DATABASES = {
'PASSWORD': '',
'HOST': '127.0.0.1', # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
'PORT': '3306', # Set to empty string for default.
+
+ # Needed when Using sqlite especially to add a longer timeout for waiting
+ # for the database lock to be released
+ # https://docs.djangoproject.com/en/1.6/ref/databases/#database-is-locked-errors
+ 'OPTIONS': {
+ 'timeout': 20,
+ },
}
}
--
2.1.4
More information about the toaster
mailing list