From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 77762E00A01; Thu, 6 Aug 2015 07:28:34 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.212.176 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com [209.85.212.176]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 34876E009B8 for ; Thu, 6 Aug 2015 07:28:30 -0700 (PDT) Received: by wibhh20 with SMTP id hh20so26816844wib.0 for ; Thu, 06 Aug 2015 07:28:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=fkImbuLEb5Yr9A6qS9yV7yg0UA0ha5GhZlhcutjaBr8=; b=FhPAlNYQluv4JJDydkxKXz9JsvPLuQqws79ypsOs63xScxQ8DwHlCe80JE71zksQWf Q5yxUgWxY93kqc0+NgDBcfxigoB3IQVgB/HbR/gEeLc4nySp9Kn8u7AXVKMi4tOVq2/V aRVwLDNudUcVF3lLKh59zMla3N1Ov+Ppxq6Vg8vOPqtvOC9W9MyWvBxX0LZQVue90/AS sNmiszRqc4nAOK8NBd0Hvw6UuVsXERlD0pzStdUXPFnqyA5XPLl7PJFCyRtqtib9Qkef ji5YsQVuQj3Q1Yaa2MW2p1Z6l5jlgPDafrYtda8nVjiF8FQs9yedxqu038rAfJ+JfusJ 7zsQ== X-Gm-Message-State: ALoCoQm4g2MJgbC9Dgggs8kaZSAZleL25hNhiEVtHhi40HRcHjiU9Y//TxHKwToE/uSN0+lxZPmy X-Received: by 10.194.248.201 with SMTP id yo9mr3755481wjc.31.1438871310206; Thu, 06 Aug 2015 07:28:30 -0700 (PDT) Received: from [192.168.2.18] ([83.217.123.106]) by smtp.googlemail.com with ESMTPSA id s1sm3600888wix.13.2015.08.06.07.28.29 for (version=TLSv1/SSLv3 cipher=OTHER); Thu, 06 Aug 2015 07:28:29 -0700 (PDT) Message-ID: <55C36F0D.7090605@intel.com> Date: Thu, 06 Aug 2015 15:28:29 +0100 From: Michael Wood User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: "toaster@yoctoproject.org" References: <1438871111-18279-1-git-send-email-michael.g.wood@intel.com> <1438871111-18279-3-git-send-email-michael.g.wood@intel.com> In-Reply-To: <1438871111-18279-3-git-send-email-michael.g.wood@intel.com> Subject: Re: [review-request][PATCH 3/3] bitbake: toastermain: Add a longer default database timeout X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Aug 2015 14:28:34 -0000 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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 > --- > 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: