Example #1
0
def get_ticks_by_property(graph, key, value):
    selected_ticks = []
    for tick in graph.get_all_ticks():
        props = graph.get_task_properties(tick)
        if key in props.keys():
            if value == props[key]:
                selected_ticks.append(tick)
    return selected_ticks
def get_ticks_by_property(graph, key, value):
    selected_ticks=[]
    for tick in graph.get_all_ticks():
        props=graph.get_task_properties(tick)
        if key in props.keys():
            if value == props[key]:
                selected_ticks.append(tick)
    return selected_ticks
Example #3
0
 def get_jobs_status(self):
     if not self.traverser and not self.traverser.get_graph():
         return None
     graph = self.traverser.get_graph()
     jobs=[]
     for tick in sorted(graph.get_all_ticks()):
         props = graph.get_task_properties(tick)
         if 'summary' in props.keys() and props['summary']:
             try:
                 jobs.append(JobStatus(str(tick), props['summary'].status))
             except:
                 pass
     return jobs
Example #4
0
 def get_jobs_status(self):
     if not self.traverser and not self.traverser.get_graph():
         return None
     graph = self.traverser.get_graph()
     jobs = []
     for tick in sorted(graph.get_all_ticks()):
         props = graph.get_task_properties(tick)
         if 'summary' in props.keys() and props['summary']:
             try:
                 jobs.append(JobStatus(str(tick), props['summary'].status))
             except:
                 pass
     return jobs
Example #5
0
 def get_task_runs(self):
     if not self.traverser and not self.traverser.get_graph():
         return None
     graph = self.traverser.get_graph()
     taskruns=[]
     for tick in sorted(graph.get_all_ticks()):
         props = graph.get_task_properties(tick)
         if 'summary' in props.keys() and props['summary'].workdir:
             summary=props['summary']
             taskrun=PipelineTaskRun("TODO:command", str(tick), summary.dfpath, summary.pid, 
                                     summary.status, os.path.join(summary.workdir, summary.dfpath), 
                                     "TODO:stdout", "TODO:stderr", "TODO:pkgreposid")
             taskruns.append(taskrun)
     return taskruns
Example #6
0
 def get_task_runs(self):
     if not self.traverser and not self.traverser.get_graph():
         return None
     graph = self.traverser.get_graph()
     taskruns = []
     for tick in sorted(graph.get_all_ticks()):
         props = graph.get_task_properties(tick)
         if 'summary' in props.keys() and props['summary'].workdir:
             summary = props['summary']
             taskrun = PipelineTaskRun(
                 "TODO:command", str(tick), summary.dfpath, summary.pid,
                 summary.status,
                 os.path.join(summary.workdir, summary.dfpath),
                 "TODO:stdout", "TODO:stderr", "TODO:pkgreposid")
             taskruns.append(taskrun)
     return taskruns
Example #7
0
 def find_FunctionDefTask(graph):
     for tick in graph.get_all_ticks():
         task = graph.get_task(tick)
         if isinstance(task, tasks.FunctionDefTask):
             return task
     raise ValueError("No function was translated.")
Example #8
0
def summary(graph):
    return [summary_entries(tick, graph) for tick in sorted(graph.get_all_ticks())]
Example #9
0
def summary(graph):
    return [
        summary_entries(tick, graph) for tick in sorted(graph.get_all_ticks())
    ]
Example #10
0
 def find_FunctionDefTask(graph):
     for tick in graph.get_all_ticks():
         task = graph.get_task(tick)
         if isinstance(task, tasks.FunctionDefTask):
             return task
     raise ValueError("No function was translated.")