Пример #1
0
def show(uid):
    dg = get_graph(uid)
    result = {}
    tasks = []
    result["uid"] = dg.graph["uid"]
    result["name"] = dg.graph["name"]
    for n in nx.topological_sort(dg):
        data = dg.node[n]
        tasks.append({"uid": n, "parameters": data, "before": dg.successors(n), "after": dg.predecessors(n)})
    result["tasks"] = tasks
    return utils.yaml_dump(result)
Пример #2
0
def show(uid):
    dg = get_graph(uid)
    result = {}
    tasks = []
    result['uid'] = dg.graph['uid']
    result['name'] = dg.graph['name']
    for task in nx.topological_sort(dg):
        tasks.append(
            {'uid': task.name,
             'parameters': task.to_dict(),
             'before': dg.successors(task),
             'after': dg.predecessors(task)
             })
    result['tasks'] = tasks
    return utils.yaml_dump(result)
Пример #3
0
def show(uid):
    dg = get_graph(uid)
    result = {}
    tasks = []
    result['uid'] = dg.graph['uid']
    result['name'] = dg.graph['name']
    for n in nx.topological_sort(dg):
        data = dg.node[n]
        tasks.append({
            'uid': n,
            'parameters': data,
            'before': dg.successors(n),
            'after': dg.predecessors(n)
        })
    result['tasks'] = tasks
    return utils.yaml_dump(result)
Пример #4
0
def show(uid):
    dg = get_graph(uid)
    result = {}
    tasks = []
    result['uid'] = dg.graph['uid']
    result['name'] = dg.graph['name']
    for n in nx.topological_sort(dg):
        data = dg.node[n]
        tasks.append(
            {'uid': n,
             'parameters': data,
             'before': dg.successors(n),
             'after': dg.predecessors(n)
             })
    result['tasks'] = tasks
    return utils.yaml_dump(result)
Пример #5
0
 def to_yaml(self):
     return utils.yaml_dump(self.to_dict())
Пример #6
0
 def to_yaml(self):
     return utils.yaml_dump(self.to_dict())