Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LANTERN-721: Increased the time delay between CHPL API Requests to 1.2 seconds #378

Merged
merged 2 commits into from
Aug 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion endpointmanager/pkg/chplquerier/chplquerier.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ func makeCHPLURL(path string, queryArgs map[string]string, pageSize int, pageNum
func getJSON(ctx context.Context, client *http.Client, chplURL *url.URL, userAgent string) ([]byte, error) {
// request ceritified products list
// Adds a short delay between request
time.Sleep(time.Duration(500 * time.Millisecond))
// LANTERN-721: Increased the delay to 1.2 seconds since the CHPL API rate limit is one request per second
time.Sleep(time.Duration(1200 * time.Millisecond))
req, err := http.NewRequest("GET", chplURL.String(), nil)
if err != nil {
return nil, errors.Wrap(err, "creating http request failed")
Expand Down
Loading