def summary_entries(tick, graph): props = graph.get_task_properties(tick) if 'summary' in props.keys() and props['summary'].workdir: summary = props['summary'] path = summary.dfpath status = summary.status time = summary.lapse_time pid = summary.pid wd = os.path.join(summary.workdir, path) return { 'tick': str(tick), 'path': path, 'pid': pid, 'status': status, 'time': time, 'workdir': wd } else: return { 'tick': str(tick), 'path': props['path'], 'pid': 'n/a', 'status': 'n/a', 'time': 0.0, 'workdir': 'n/a' }
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
def summary_entries(tick, graph): props = graph.get_task_properties(tick) if 'summary' in props.keys() and props['summary'].workdir: summary=props['summary'] path=summary.dfpath status=summary.status time=summary.lapse_time pid=summary.pid wd=os.path.join(summary.workdir,path) return { 'tick': str(tick), 'path':path, 'pid':pid, 'status':status, 'time':time, 'workdir':wd } else: return { 'tick': str(tick), 'path':props['path'], 'pid':'n/a', 'status':'n/a', 'time':0.0, 'workdir':'n/a' }
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
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
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
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