bitbake: toaster: unlock BuildEnvirnoment when build is done
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. (Bitbake rev: faa88272d656640c039572c5c8f3e6c56535b6f7) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
ad04a6324e
commit
7a3cccbd1a
|
@ -1524,9 +1524,7 @@ class BuildInfoHelper(object):
|
||||||
return
|
return
|
||||||
|
|
||||||
br_id, be_id = self.brbe.split(":")
|
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)
|
br = BuildRequest.objects.get(pk = br_id)
|
||||||
|
|
||||||
# if we're 'done' because we got cancelled update the build outcome
|
# if we're 'done' because we got cancelled update the build outcome
|
||||||
|
@ -1543,6 +1541,10 @@ class BuildInfoHelper(object):
|
||||||
else:
|
else:
|
||||||
br.state = BuildRequest.REQ_FAILED
|
br.state = BuildRequest.REQ_FAILED
|
||||||
br.save()
|
br.save()
|
||||||
|
|
||||||
|
be = BuildEnvironment.objects.get(pk = be_id)
|
||||||
|
be.lock = BuildEnvironment.LOCK_FREE
|
||||||
|
be.save()
|
||||||
signal_runbuilds()
|
signal_runbuilds()
|
||||||
|
|
||||||
def store_log_error(self, text):
|
def store_log_error(self, text):
|
||||||
|
|
Loading…
Reference in New Issue