Bogdanp / awesome-advent-of-code

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

Fix API rate limiting #1840

Closed ndunnett closed 4 months ago

ndunnett commented 4 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 4 months ago

Thanks!