Skip to content

Commit

Permalink
Merge pull request #8 from pjcalvo/main
Browse files Browse the repository at this point in the history
match the browser timeout with job timeout
  • Loading branch information
gosom authored Jan 18, 2025
2 parents 95aeef4 + 7715518 commit 0313772
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions adapters/fetchers/jshttp/jshttp.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ func (o *jsFetch) Fetch(ctx context.Context, job scrapemate.IJob) scrapemate.Res
Error: err,
}
}

// match the browser default timeout to the job timeout
if job.GetTimeout() > 0 {
page.SetDefaultTimeout(float64(job.GetTimeout().Milliseconds()))
}
}

defer page.Close()
Expand Down

0 comments on commit 0313772

Please sign in to comment.