Open webknjaz opened 5 years ago
Some kind of a leaky bucket seems to be appropriate here. It should take into account the overall rate limit, remaining rate limit and retry-after reported by GitHub API.
Prior art:
Ref: https://github.com/octokit/plugin-throttling.js
https://github.com/chdsbd/kodiak/blob/0de6ed7/bot/kodiak/throttle.py
https://github.com/chdsbd/kodiak/pull/196
https://github.com/chdsbd/kodiak/pull/70
Some kind of a leaky bucket seems to be appropriate here. It should take into account the overall rate limit, remaining rate limit and retry-after reported by GitHub API.
Prior art: