From: Michael Wood <michael.g.wood@intel.com>
To: "toaster@yoctoproject.org" <toaster@yoctoproject.org>
Subject: Re: [review-request][PATCH 3/3] bitbake: toastermain: Add a longer default database timeout
Date: Thu, 06 Aug 2015 15:28:29 +0100 [thread overview]
Message-ID: <55C36F0D.7090605@intel.com> (raw)
In-Reply-To: <1438871111-18279-3-git-send-email-michael.g.wood@intel.com>
Should have mentioned that this is a v2 series of
https://lists.yoctoproject.org/pipermail/toaster/2015-July/002428.html
https://lists.yoctoproject.org/pipermail/toaster/2015-July/002429.html
https://lists.yoctoproject.org/pipermail/toaster/2015-July/002430.html
Which is now rebased and with the fixes for review items mentioned by Ed
Michael
On 06/08/15 15:25, Michael Wood wrote:
> 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@intel.com>
> ---
> bitbake/lib/toaster/toastermain/settings.py | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/bitbake/lib/toaster/toastermain/settings.py b/bitbake/lib/toaster/toastermain/settings.py
> index c72a904..b149a5e 100644
> --- a/bitbake/lib/toaster/toastermain/settings.py
> +++ b/bitbake/lib/toaster/toastermain/settings.py
> @@ -49,6 +49,12 @@ DATABASES = {
> }
> }
>
> +# 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
> +if 'sqlite' in DATABASES['default']['ENGINE']:
> + DATABASES['default']['OPTIONS'] = { 'timeout': 20 }
> +
> # Reinterpret database settings if we have DATABASE_URL environment variable defined
>
> if 'DATABASE_URL' in os.environ:
prev parent reply other threads:[~2015-08-06 14:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-06 14:25 [review-request][PATCH 1/3] bitbake: toastergui: Fix toastertable table header reference Michael Wood
2015-08-06 14:25 ` [review-request][PATCH 2/3] bitbake: toastergui: Move layerdetails view definition to the views.py Michael Wood
2015-08-06 14:25 ` [review-request][PATCH 3/3] bitbake: toastermain: Add a longer default database timeout Michael Wood
2015-08-06 14:28 ` Michael Wood [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55C36F0D.7090605@intel.com \
--to=michael.g.wood@intel.com \
--cc=toaster@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.