-
Notifications
You must be signed in to change notification settings - Fork 234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Github can return api rate limit for ip. #321
Comments
I propose to change the URL from https://api.github.com/repos/noisetorch/NoiseTorch/releases?per_page=1&page=1 to https://api.github.com/repos/noisetorch/NoiseTorch/releases/latest It will remove unneeded array here. |
Welcome to steal any of the logic for my GitHub release update check here: https://github.com/Technetium1/ChocolateyUpdate/blob/40b481391d2dfe98f17e734549c1ff8a16665138/ChocolateyUpdate.py#L108 |
I've pushed an update so that being rate limited does not result in a crash. I'll will be merged when @ZyanKLee comes back. |
Lines 185 to 194 in 68991f8
Here is a useless declaration of a variable body, readErr := ioutil.ReadAll(res.Body)
if readErr != nil {
log.Fatal(readErr)
}
var latest_release github_releases
err = json.Unmarshal(body, &latest_release) |
Crash fixed in #317 which has just been merged. As for the rate limit, Github allows 50 API requests per hour per IP, so I think it's enough. I took note of your suggestions and will apply them very soon. |
Github can return api rate limit for ip.
I installed noisetorch service according to the instructions https://github.com/noisetorch/NoiseTorch/wiki/Start-automatically-with-Systemd
By my mistake, the program restarted endlessly. As a result I got a softban in github api.
GET https://api.github.com/repos/noisetorch/NoiseTorch/releases?per_page=1&page=1
Noisetorch Error:
Originally posted by @compico in #316 (comment)
message
anddocumentation_url
.x-ratelimit-limit
x-ratelimit-remaining
x-ratelimit-reset
x-ratelimit-used
The text was updated successfully, but these errors were encountered: