fix: 减少等待时长

This commit is contained in:
spiritlhl 2025-08-05 16:21:53 +08:00 committed by GitHub
parent 1fbb0758b6
commit 4c859e663e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -70,7 +70,7 @@ func executeWithRetry(client *req.Client, url string, config retryConfig) (*req.
lastErr = fmt.Errorf("attempt %d failed with HTTP status %d (timeout %v)", attempt+1, resp.StatusCode, timeout)
}
if attempt < config.maxRetries-1 {
time.Sleep(3 * time.Second)
time.Sleep(1 * time.Second)
}
}
return nil, fmt.Errorf("all %d attempts failed, last error: %w", config.maxRetries, lastErr)