aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/orm/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/toaster/orm/models.py')
-rw-r--r--bitbake/lib/toaster/orm/models.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index 2df6d4910a..4641736add 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -397,9 +397,15 @@ class Build(models.Model):
completed_on = models.DateTimeField()
outcome = models.IntegerField(choices=BUILD_OUTCOME, default=IN_PROGRESS)
cooker_log_path = models.CharField(max_length=500)
- build_name = models.CharField(max_length=100)
+ build_name = models.CharField(max_length=100, default='')
bitbake_version = models.CharField(max_length=50)
+ # number of recipes to parse for this build
+ recipes_to_parse = models.IntegerField(default=1)
+
+ # number of recipes parsed so far for this build
+ recipes_parsed = models.IntegerField(default=0)
+
@staticmethod
def get_recent(project=None):
"""
@@ -615,6 +621,13 @@ class Build(models.Model):
else:
return False
+ def is_parsing(self):
+ """
+ True if the build is still parsing recipes
+ """
+ return self.outcome == Build.IN_PROGRESS and \
+ self.recipes_parsed < self.recipes_to_parse
+
def get_state(self):
"""
Get the state of the build; one of 'Succeeded', 'Failed', 'In Progress',
@@ -628,6 +641,8 @@ class Build(models.Model):
return 'Cancelling';
elif self.is_queued():
return 'Queued'
+ elif self.is_parsing():
+ return 'Parsing'
else:
return self.get_outcome_text()