summaryrefslogtreecommitdiff
path: root/src/buildstream/_state.py
diff options
context:
space:
mode:
authorTom Pollard <tom.pollard@codethink.co.uk>2019-10-23 16:21:09 +0100
committerbst-marge-bot <marge-bot@buildstream.build>2019-10-25 15:03:07 +0000
commit9733beff961cf7001a66b008fb9fc8ceadefdcd6 (patch)
treea1a20547fd7c712049ffa430285df6097248811e /src/buildstream/_state.py
parent732f4742e775c3297a8fed7da4225afc070430e3 (diff)
downloadbuildstream-9733beff961cf7001a66b008fb9fc8ceadefdcd6.tar.gz
_frontend/status.py: Complete names when rendering dynamic queue status
At somepoint action_name instead of complete_name started to be rendered to the user for the dynamic list of queue status reports. As we now have more of a UI seperation between 'Artifact' & 'Source' tasks, it also makes sense to reflect these actions in this output.
Diffstat (limited to 'src/buildstream/_state.py')
-rw-r--r--src/buildstream/_state.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/buildstream/_state.py b/src/buildstream/_state.py
index c99434018..310e12a63 100644
--- a/src/buildstream/_state.py
+++ b/src/buildstream/_state.py
@@ -26,10 +26,12 @@ from collections import OrderedDict
# Args:
# name (str): The name of the Task Group, e.g. 'build'
# state (State): The state object
+# complete_name (str): Optional name for frontend status rendering, e.g. 'built'
#
class TaskGroup():
- def __init__(self, name, state):
+ def __init__(self, name, state, complete_name=None):
self.name = name
+ self.complete_name = complete_name
self.processed_tasks = 0
self.skipped_tasks = 0
# NOTE: failed_tasks is a list of strings instead of an integer count
@@ -236,13 +238,14 @@ class State():
#
# Args:
# name (str): The name of the task group, e.g. 'build'
+ # complete_name (str): Optional name to be used for frontend status rendering, e.g. 'built'
#
# Returns:
# TaskGroup: The task group created
#
- def add_task_group(self, name):
+ def add_task_group(self, name, complete_name=None):
assert name not in self.task_groups, "Trying to add task group '{}' to '{}'".format(name, self.task_groups)
- group = TaskGroup(name, self)
+ group = TaskGroup(name, self, complete_name)
self.task_groups[name] = group
return group