Skip to content

Commit

Permalink
Increased the time delay between CHPL API Requests to 1.2 seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
rishi-salunkhe-mettle committed Jul 30, 2024
1 parent 2a5af62 commit 5169341
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion endpointmanager/pkg/chplquerier/chplquerier.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ 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))
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

0 comments on commit 5169341

Please sign in to comment.