All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Wood <michael.g.wood@intel.com>
To: toaster@yoctoproject.org
Subject: Re: [PATCH 7/7] toaster: unlock BuildEnvirnoment when build is done
Date: Fri, 16 Sep 2016 17:25:03 +0100	[thread overview]
Message-ID: <a1d79275-a459-ae17-75e5-a2423f00b4a5@intel.com> (raw)
In-Reply-To: <d2aaba6cc5c126eb743a8bcbacb49528a04f0e5d.1473769704.git.ed.bartosh@linux.intel.com>

Thanks - send to bitbake-devel and applied to toaster-next

On 13/09/16 14:21, Ed Bartosh wrote:
> There is no need to lock build environment before changing
> build status as this operation is very fast. However, there
> is a need to unlock it after changing build status.
>
> Explicitly unlocked BuildEnvironment after build reaches
> final status SUCCEEDED, FAILED or CANCELLED. This should
> allow runbuilds process to pickup next build faster.
>
> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
> ---
>   bitbake/lib/bb/ui/buildinfohelper.py | 8 +++++---
>   1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
> index c93ee94..2246960 100644
> --- a/bitbake/lib/bb/ui/buildinfohelper.py
> +++ b/bitbake/lib/bb/ui/buildinfohelper.py
> @@ -1524,9 +1524,7 @@ class BuildInfoHelper(object):
>               return
>   
>           br_id, be_id = self.brbe.split(":")
> -        be = BuildEnvironment.objects.get(pk = be_id)
> -        be.lock = BuildEnvironment.LOCK_LOCK
> -        be.save()
> +
>           br = BuildRequest.objects.get(pk = br_id)
>   
>           # if we're 'done' because we got cancelled update the build outcome
> @@ -1543,6 +1541,10 @@ class BuildInfoHelper(object):
>           else:
>               br.state = BuildRequest.REQ_FAILED
>           br.save()
> +
> +        be = BuildEnvironment.objects.get(pk = be_id)
> +        be.lock = BuildEnvironment.LOCK_FREE
> +        be.save()
>           signal_runbuilds()
>   
>       def store_log_error(self, text):




      reply	other threads:[~2016-09-16 16:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-13 13:20 [PATCH 0/7] Fix for #8918: Change the way we handle queued builds Ed Bartosh
2016-09-13 13:20 ` [PATCH 1/7] toaster: implement signal_runbuilds function Ed Bartosh
2016-09-13 13:20 ` [PATCH 2/7] toaster: notify runbuilds when build status changes Ed Bartosh
2016-09-13 13:21 ` [PATCH 3/7] runbuilds: process builds on SIGUSR1 Ed Bartosh
2016-09-13 13:21 ` [PATCH 4/7] runbuilds: process builds on start Ed Bartosh
2016-09-13 13:21 ` [PATCH 5/7] runbuilds: code cleanup - whitespaces, long lines Ed Bartosh
2016-09-13 13:21 ` [PATCH 6/7] runbuilds: code cleanup - remove unused imports Ed Bartosh
2016-09-13 13:21 ` [PATCH 7/7] toaster: unlock BuildEnvirnoment when build is done Ed Bartosh
2016-09-16 16:25   ` 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=a1d79275-a459-ae17-75e5-a2423f00b4a5@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.