diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2015-06-17 12:27:48 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-06-26 09:27:32 +0100 |
commit | 335c975650580001b2176020c762c002bde198d6 (patch) | |
tree | a9e2907b72bbbac2ad897b7839f8114e60935038 /bitbake/lib/toaster/bldcontrol/management | |
parent | d7c8d9558c8b600be1507212c78dde833b2bb57e (diff) | |
download | poky-335c975650580001b2176020c762c002bde198d6.tar.gz |
bitbake: 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.
(Bitbake rev: 57f790b0c56297af8c83d5def8461bd5d61fe4af)
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/bldcontrol/management')
-rw-r--r-- | bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py b/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py index da7d4af07e..bcf3b04cf0 100644 --- a/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py +++ b/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py | |||
@@ -6,7 +6,7 @@ from bldcontrol.models import BuildRequest, BuildEnvironment, BRError, BRVariabl | |||
6 | import os | 6 | import os |
7 | import logging | 7 | import logging |
8 | 8 | ||
9 | logger = logging.getLogger("toaster") | 9 | logger = logging.getLogger("ToasterScheduler") |
10 | 10 | ||
11 | class Command(NoArgsCommand): | 11 | class Command(NoArgsCommand): |
12 | args = "" | 12 | args = "" |
@@ -35,7 +35,7 @@ class Command(NoArgsCommand): | |||
35 | # select the build environment and the request to build | 35 | # select the build environment and the request to build |
36 | br = self._selectBuildRequest() | 36 | br = self._selectBuildRequest() |
37 | except IndexError as e: | 37 | except IndexError as e: |
38 | # logger.debug("runbuilds: No build request") | 38 | #logger.debug("runbuilds: No build request") |
39 | return | 39 | return |
40 | try: | 40 | try: |
41 | bec = self._selectBuildEnvironment() | 41 | bec = self._selectBuildEnvironment() |
@@ -113,10 +113,11 @@ class Command(NoArgsCommand): | |||
113 | 113 | ||
114 | # update all Builds that failed to start | 114 | # update all Builds that failed to start |
115 | 115 | ||
116 | for br in BuildRequest.objects.filter(state = BuildRequest.REQ_FAILED): | 116 | for br in BuildRequest.objects.filter(state = BuildRequest.REQ_FAILED, build__outcome = Build.IN_PROGRESS): |
117 | br.build.outcome = Build.FAILED | 117 | br.build.outcome = Build.FAILED |
118 | # transpose the launch errors in ToasterExceptions | 118 | # transpose the launch errors in ToasterExceptions |
119 | for brerror in br.brerror_set.all(): | 119 | for brerror in br.brerror_set.all(): |
120 | logger.debug("Saving error %s" % brerror) | ||
120 | LogMessage.objects.create(build = br.build, level = LogMessage.EXCEPTION, message = brerror.errmsg) | 121 | LogMessage.objects.create(build = br.build, level = LogMessage.EXCEPTION, message = brerror.errmsg) |
121 | br.build.save() | 122 | br.build.save() |
122 | 123 | ||