def decision_task(self): """A representation of the decision task. Returns: Task: A `Task` instance representing the decision task. """ index = self.index + ".taskgraph.decision" task_id = find_task_id(index) return Task(id=task_id)
def get_shadow_scheduler_tasks(self, name): """Returns all tasks the given shadow scheduler would have scheduled, or None if the given scheduler didn't run. Args: name (str): The name of the shadow scheduler to query. Returns: list: All task labels that would have been scheduled. """ index = self.index + ".source.shadow-scheduler-{}".format(name) task = Task(id=find_task_id(index)) labels = task.get_artifact("public/shadow-scheduler/optimized_tasks.list") return set(labels.splitlines())