Skip to content

Commit

Permalink
Turn on includeCursor parameter
Browse files Browse the repository at this point in the history
Signed-off-by: Eamonn Mansour <47121388+eamansour@users.noreply.github.com>
  • Loading branch information
eamansour committed Aug 22, 2024
1 parent e93dad9 commit 60b2057
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/runs/runsGet.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ func GetRunsFromRestApi(
var runData *galasaapi.RunResults
var httpResponse *http.Response
log.Printf("Requesting page '%d' ", pageNumberWanted)
apicall := apiClient.ResultArchiveStoreAPIApi.GetRasSearchRuns(context).ClientApiVersion(restApiVersion)
apicall := apiClient.ResultArchiveStoreAPIApi.GetRasSearchRuns(context).ClientApiVersion(restApiVersion).IncludeCursor("true")
if fromAgeMins != 0 {
apicall = apicall.From(fromTime)
}
Expand Down Expand Up @@ -272,6 +272,7 @@ func GetRunsFromRestApi(
// Add all the runs into our set of results.
// Note: The ... syntax means 'all of the array', so they all get appended at once.
results = append(results, runsOnThisPage...)
log.Print("APPENDING ")

// Have we processed the last page ?
if !runData.HasNextCursor() || pageCursor == runData.GetNextCursor() {
Expand Down

0 comments on commit 60b2057

Please sign in to comment.