Skip to content

Commit

Permalink
buildkite insights: fix page offset (#26559)
Browse files Browse the repository at this point in the history
  • Loading branch information
nrainer-materialize authored Apr 10, 2024
1 parent 44a876a commit 8744741
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def get_multiple(
results = []

print(f"Starting to fetch data from Buildkite: {request_path}")
params["page"] = str(first_page)

fetch_count = 0
while True:
Expand All @@ -53,7 +54,7 @@ def get_multiple(
if isinstance(result, dict) and result.get("message"):
raise RuntimeError(f"Something went wrong! ({result['message']})")

params["page"] = str(int(params.get("page", "1")) + 1)
params["page"] = str(int(params["page"]) + 1)

entry_count = len(result)
created_at = result[-1]["created_at"]
Expand Down

0 comments on commit 8744741

Please sign in to comment.