From 9733beff961cf7001a66b008fb9fc8ceadefdcd6 Mon Sep 17 00:00:00 2001 From: Tom Pollard Date: Wed, 23 Oct 2019 16:21:09 +0100 Subject: _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. --- src/buildstream/_state.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/buildstream/_state.py') 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 -- cgit v1.2.1