cleaned code from comments and minor errors
This commit is contained in:
@@ -73,10 +73,9 @@ func (b *ArgoBuilder) createDAGstep() {
|
||||
|
||||
for _, comp := range b.graph.Computings{
|
||||
unique_name := comp.Name + "_" + comp.ID
|
||||
|
||||
step := Task{Name: unique_name, Template: unique_name}
|
||||
|
||||
comp_envs := getComputingEnvironment(comp.Environment)
|
||||
|
||||
for name, value := range comp_envs {
|
||||
step.Arguments.Parameters = append(step.Arguments.Parameters, Parameter{Name: name, Value: value})
|
||||
}
|
||||
@@ -91,7 +90,6 @@ func (b *ArgoBuilder) createDAGstep() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
new_dag.Tasks = append(new_dag.Tasks, step)
|
||||
|
||||
}
|
||||
@@ -109,7 +107,6 @@ func (b *ArgoBuilder) getDependency (current_computing_id string, branch []strin
|
||||
if current_link.Source == current_computing_id || current_link.Destination == current_computing_id {
|
||||
current_computing_found = true
|
||||
}
|
||||
|
||||
if current_computing_found {
|
||||
return b.findPreviousComputing(current_computing_id,branch,i-1)
|
||||
}
|
||||
@@ -160,7 +157,6 @@ func getComputingArgs(user_input []string) (list_args []string) {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
for _, arg := range user_input{
|
||||
list_args = append(list_args, "'" + arg + "'")
|
||||
}
|
||||
@@ -187,8 +183,7 @@ func getComputingEnvironment(user_input []string) (map_env map[string]string) {
|
||||
panic(0)
|
||||
}
|
||||
|
||||
map_env[new_pair[0]] = new_pair[1]
|
||||
|
||||
map_env[new_pair[0]] = new_pair[1]
|
||||
}
|
||||
|
||||
return
|
||||
@@ -196,8 +191,9 @@ func getComputingEnvironment(user_input []string) (map_env map[string]string) {
|
||||
|
||||
func getComputingEnvironmentName(user_input []string) (list_names []string){
|
||||
env_map := getComputingEnvironment(user_input)
|
||||
for name, _ := range env_map {
|
||||
for name := range env_map {
|
||||
list_names = append(list_names, name)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user