mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-26 15:25:43 +03:00
migration: github: if rate limit is not enabled, ignore it (#15490)
This commit is contained in:
parent
217b5c150f
commit
2a42d80d14
1 changed files with 5 additions and 0 deletions
|
@ -132,6 +132,11 @@ func (g *GithubDownloaderV3) sleep() {
|
||||||
func (g *GithubDownloaderV3) RefreshRate() error {
|
func (g *GithubDownloaderV3) RefreshRate() error {
|
||||||
rates, _, err := g.client.RateLimits(g.ctx)
|
rates, _, err := g.client.RateLimits(g.ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
// if rate limit is not enabled, ignore it
|
||||||
|
if strings.Contains(err.Error(), "404") {
|
||||||
|
g.rate = nil
|
||||||
|
return nil
|
||||||
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue