コード例 #1
0
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'
        }
コード例 #2
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
コード例 #3
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
コード例 #4
0
ファイル: runner.py プロジェクト: istoney/eucliddatasimulator
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' }
コード例 #5
0
ファイル: runner.py プロジェクト: istoney/eucliddatasimulator
 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
コード例 #6
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
コード例 #7
0
ファイル: runner.py プロジェクト: istoney/eucliddatasimulator
 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
コード例 #8
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