chore: build
Backend - Build & Lint / build (push) Failing after 28m23s

This commit is contained in:
Nuxgrid
2026-07-12 15:20:53 +02:00
parent 2919bca86d
commit 4de42cff57
40 changed files with 2539 additions and 796 deletions
+1 -5
View File
@@ -68,27 +68,23 @@ func (m *tomTomKeyManager) Do(client *http.Client, buildReq func(key string) (*h
_, startIdx := m.currentKey()
for attempt := 0; attempt < n; attempt++ {
for attempt := range n {
idx := (startIdx + attempt) % n
key := m.keys[idx]
req, err := buildReq(key)
if err != nil {
return nil, err
}
resp, err := client.Do(req)
if err != nil {
return nil, err
}
if resp.StatusCode == http.StatusForbidden || resp.StatusCode == http.StatusTooManyRequests {
io.Copy(io.Discard, resp.Body)
resp.Body.Close()
m.rotate(idx)
continue
}
return resp, nil
}