瀏覽代碼

migration: github: if rate limit is not enabled, ignore it (#15490)

tags/v1.15.0-rc1
6543 3 年之前
父節點
當前提交
2a42d80d14
No account linked to committer's email address
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5
    0
      modules/migrations/github.go

+ 5
- 0
modules/migrations/github.go 查看文件

@@ -132,6 +132,11 @@ func (g *GithubDownloaderV3) sleep() {
func (g *GithubDownloaderV3) RefreshRate() error {
rates, _, err := g.client.RateLimits(g.ctx)
if err != nil {
// if rate limit is not enabled, ignore it
if strings.Contains(err.Error(), "404") {
g.rate = nil
return nil
}
return err
}


Loading…
取消
儲存