Skip to content

Commit

Permalink
Removes unused processRersponses callback
Browse files Browse the repository at this point in the history
  • Loading branch information
olegbespalov committed Dec 12, 2023
1 parent baa5dd4 commit 91ef773
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
1 change: 0 additions & 1 deletion js/modules/k6/http/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,6 @@ func (c *Client) Batch(reqsV ...goja.Value) (interface{}, error) {
errs := httpext.MakeBatchRequests(
c.moduleInstance.vu.Context(), state, batchReqs, reqCount,
int(state.Options.Batch.Int64), int(state.Options.BatchPerHost.Int64),
c.processResponse,
)

for i := 0; i < reqCount; i++ {
Expand Down
3 changes: 0 additions & 3 deletions lib/netext/httpext/batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,10 @@ type BatchParsedHTTPRequest struct {
// pre-initialized. In addition, each processed request would emit either a nil
// value, or an error, via the returned errors channel. The goroutines exit when
// the requests channel is closed.
// The processResponse callback can be used to modify the response, e.g.
// to replace the body.
func MakeBatchRequests(
ctx context.Context, state *lib.State,
requests []BatchParsedHTTPRequest,
reqCount, globalLimit, perHostLimit int,
processResponse func(*Response, ResponseType),
) <-chan error {
workers := globalLimit
if reqCount < workers {
Expand Down

0 comments on commit 91ef773

Please sign in to comment.