Skip to content

Commit

Permalink
Merge pull request #110 from trickest/fix/subjob-children
Browse files Browse the repository at this point in the history
Update subjob children API endpoints
  • Loading branch information
mhmdiaa authored Feb 21, 2024
2 parents ec7112a + 9656d0f commit f392d62
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cmd/output/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -587,8 +587,8 @@ func GetWorkflowVersionMaxMachines(version, fleet uuid.UUID) (types.Machines, er
}

func getChildrenSubJobsCount(subJobID uuid.UUID) int {
urlReq := "subjob/" + subJobID.String() + "/children/"
urlReq += "?page_size=" + strconv.Itoa(math.MaxInt)
urlReq := "subjob/children/?parent=" + subJobID.String()
urlReq += "&page_size=" + strconv.Itoa(math.MaxInt)

resp := request.Trickest.Get().DoF(urlReq)
if resp == nil {
Expand Down Expand Up @@ -619,8 +619,9 @@ func getChildrenSubJobs(subJobID uuid.UUID) []types.SubJob {

var subJobs []types.SubJob

urlReq := "subjob/" + subJobID.String() + "/children/"
urlReq += "?task_index="
urlReq := "subjob/children/?parent=" + subJobID.String()
urlReq += "&task_index="

for i := 1; i <= subJobCount; i++ {
urlReqForIndex := urlReq + strconv.Itoa(i)
resp := request.Trickest.Get().DoF(urlReqForIndex)
Expand Down

0 comments on commit f392d62

Please sign in to comment.