aboutsummaryrefslogtreecommitdiffstats
path: root/lib/toaster/bldcontrol/management/commands/runbuilds.py
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2015-06-17 12:27:48 +0100
committerAlexandru DAMIAN <alexandru.damian@intel.com>2015-06-25 11:10:06 +0100
commit57f790b0c56297af8c83d5def8461bd5d61fe4af (patch)
tree048e01a4f63400f90ece6db69d321a36597361a5 /lib/toaster/bldcontrol/management/commands/runbuilds.py
parent51a41172d0b390370f9a38696b1ac65666ada4d2 (diff)
downloadbitbake-contrib-57f790b0c56297af8c83d5def8461bd5d61fe4af.tar.gz
toaster: fixes after replacing BuildRequest with Build
This is a set of fixes that repair the interface after we switched from displaying BuildRequest data to Build data in the formerly "managed" mode. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Diffstat (limited to 'lib/toaster/bldcontrol/management/commands/runbuilds.py')
-rw-r--r--lib/toaster/bldcontrol/management/commands/runbuilds.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/toaster/bldcontrol/management/commands/runbuilds.py b/lib/toaster/bldcontrol/management/commands/runbuilds.py
index da7d4af07..bcf3b04cf 100644
--- a/lib/toaster/bldcontrol/management/commands/runbuilds.py
+++ b/lib/toaster/bldcontrol/management/commands/runbuilds.py
@@ -6,7 +6,7 @@ from bldcontrol.models import BuildRequest, BuildEnvironment, BRError, BRVariabl
import os
import logging
-logger = logging.getLogger("toaster")
+logger = logging.getLogger("ToasterScheduler")
class Command(NoArgsCommand):
args = ""
@@ -35,7 +35,7 @@ class Command(NoArgsCommand):
# select the build environment and the request to build
br = self._selectBuildRequest()
except IndexError as e:
- # logger.debug("runbuilds: No build request")
+ #logger.debug("runbuilds: No build request")
return
try:
bec = self._selectBuildEnvironment()
@@ -113,10 +113,11 @@ class Command(NoArgsCommand):
# update all Builds that failed to start
- for br in BuildRequest.objects.filter(state = BuildRequest.REQ_FAILED):
+ for br in BuildRequest.objects.filter(state = BuildRequest.REQ_FAILED, build__outcome = Build.IN_PROGRESS):
br.build.outcome = Build.FAILED
# transpose the launch errors in ToasterExceptions
for brerror in br.brerror_set.all():
+ logger.debug("Saving error %s" % brerror)
LogMessage.objects.create(build = br.build, level = LogMessage.EXCEPTION, message = brerror.errmsg)
br.build.save()