no bursts to avoid 429 and 30 sec waits
This commit is contained in:
parent
18e8cb055e
commit
0fe54519ea
1 changed files with 2 additions and 2 deletions
|
|
@ -29,8 +29,8 @@ func NewClient(key string, dryRun bool) *Client {
|
|||
key: key,
|
||||
dryRun: dryRun,
|
||||
http: &http.Client{Timeout: 30 * time.Second},
|
||||
// 60 requests per 30 seconds: 2/sec sustained, burst of 60.
|
||||
limiter: rate.NewLimiter(2, 60),
|
||||
// limit to 2 requests per second, no bursts to avoid 429s
|
||||
limiter: rate.NewLimiter(2, 1),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue