Bogdanp / awesome-advent-of-code

A collection of awesome resources related to the yearly Advent of Code challenge.
2.87k stars 879 forks source link

Fix API rate limiting #1840

Closed ndunnett closed 6 months ago

ndunnett commented 6 months ago

Issue https://github.com/Bogdanp/awesome-advent-of-code/issues/1839

I wasn't able to reproduce the rate limiting locally, but I assume the problem was exceeding CPU time (90 seconds per 60 seconds real time per GitHub docs). I've implemented a wait period of 20 seconds between requests to alleviate this (requestWaitTime in updateRepos.js), if we have more problems we can increase this value.

I also increased chunkSize from 200 to 250 which will reduce the amount of requests made but will run closer to timing out each request. It should still be fine but if it starts timing out requests we may need to dial that back again.

Bogdanp commented 6 months ago

Thanks!