mozilla-services / pagerstatus

A service to automatically update Statuspage.io based on Pagerduty incidents
Apache License 2.0
7 stars 5 forks source link

Handle pagination in response from pagerduty #1

Open sciurus opened 6 years ago

sciurus commented 6 years ago

If our query for acknowledged pagerduty incidents returns more than 100 results, we'll only look at the first 100. This mean statuspage and pagerduty would get out of sync. We should handle this by refetching results with higher offsets until there are no more, then returning them all.

https://v2.developer.pagerduty.com/docs/pagination

https://github.com/mozilla-services/pagerstatus/blob/master/chalicelib/pagerduty.py#L15-L27