summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/toaster/orm/models.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index cfa243c595..3da9a66d0c 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -436,6 +436,21 @@ class Build(models.Model):
436 436
437 return recent_builds 437 return recent_builds
438 438
439 def started(self):
440 """
441 As build variables are only added for a build when its BuildStarted event
442 is received, a build with no build variables is counted as
443 "in preparation" and not properly started yet. This method
444 will return False if a build has no build variables (it never properly
445 started), or True otherwise.
446
447 Note that this is a temporary workaround for the fact that we don't
448 have a fine-grained state variable on a build which would allow us
449 to record "in progress" (BuildStarted received) vs. "in preparation".
450 """
451 variables = Variable.objects.filter(build=self)
452 return len(variables) > 0
453
439 def completeper(self): 454 def completeper(self):
440 tf = Task.objects.filter(build = self) 455 tf = Task.objects.filter(build = self)
441 tfc = tf.count() 456 tfc = tf.count()