generates the steps of a dag yaml

This commit is contained in:
pb
2024-05-02 09:52:28 +02:00
parent 603dd62f99
commit b7441c7430
5 changed files with 279 additions and 4 deletions

View File

@@ -270,7 +270,6 @@ func (g *Graph) ExportToArgo(id string) error {
// Return a list containing the IDs of each link that make up a branch in the graph
func (g *Graph) getListBranches(end_links map[string]models.Link, editable_link_list map[string]models.Link, current_branch []string) (list_branches [][]string) {
fmt.Printf("Working on %v \n", current_branch)
if current_branch == nil {
current_branch = make([]string, 0)
}
@@ -289,8 +288,9 @@ func (g *Graph) getListBranches(end_links map[string]models.Link, editable_link_
previous_index := g.hasPreviousLink(j, editable_link_list)
if len(previous_index) == 0 {
new_branches = append(new_branches, []string{link_id})
return new_branches
// new_branches = append(new_branches, []string{link_id})
// return new_branches
list_branches = append(list_branches, []string{link_id})
}
for _, id_link := range previous_index {
@@ -309,7 +309,6 @@ func (g *Graph) getListBranches(end_links map[string]models.Link, editable_link_
}
return
}