summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2015-08-06 19:01:36 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-08-06 16:04:49 -0500
commitb12e51c352e8a8bc7dbe76205dca7f7100bd218e (patch)
treea5211251d3f7bc58f0d4c3ec3a757a06c3f53261 /bitbake/lib/toaster
parentaf72d0fbb2d0f4d9aa29e124b3b4e216017f771d (diff)
downloadpoky-b12e51c352e8a8bc7dbe76205dca7f7100bd218e.tar.gz
bitbake: toastermain: Add a longer default database timeout
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 (Bitbake rev: 7f3a4e0330f4de3ba8e092bc1c15a53d8c2be073) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster')
-rw-r--r--bitbake/lib/toaster/toastermain/settings.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/toastermain/settings.py b/bitbake/lib/toaster/toastermain/settings.py
index c72a90411b..b149a5ed83 100644
--- a/bitbake/lib/toaster/toastermain/settings.py
+++ b/bitbake/lib/toaster/toastermain/settings.py
@@ -49,6 +49,12 @@ DATABASES = {
49 } 49 }
50} 50}
51 51
52# Needed when Using sqlite especially to add a longer timeout for waiting
53# for the database lock to be released
54# https://docs.djangoproject.com/en/1.6/ref/databases/#database-is-locked-errors
55if 'sqlite' in DATABASES['default']['ENGINE']:
56 DATABASES['default']['OPTIONS'] = { 'timeout': 20 }
57
52# Reinterpret database settings if we have DATABASE_URL environment variable defined 58# Reinterpret database settings if we have DATABASE_URL environment variable defined
53 59
54if 'DATABASE_URL' in os.environ: 60if 'DATABASE_URL' in os.environ: