Fix total_pages calculation bug and add tests
- Fixed total_pages calculation: API returns 5 events/page, not PAGE_SIZE - This was causing partial=false positives when max_total was used - Updated tests to use correct pagination values
This commit is contained in:
@@ -235,7 +235,7 @@ def fetch_all_pages(
|
||||
if total_raw == 0:
|
||||
return {"events": [], "total_raw": 0, "partial": False}
|
||||
|
||||
total_pages = (total_raw + PAGE_SIZE - 1) // PAGE_SIZE
|
||||
total_pages = (total_raw + 4) // 5
|
||||
concurrency = min(MAX_PARALLEL_FETCHES, total_pages)
|
||||
|
||||
all_page_data: dict[int, list[Any]] = {}
|
||||
|
||||
Reference in New Issue
Block a user