puppeteer-cluster
puppeteer-cluster copied to clipboard
I think a timeout of `0` should disable timeouts
this would reflect's puppeteer's use of the timeout option where if 0 is passed the timeout is never triggered. This is useful for some long-running tasks.
Example usage:
const c: Cluster<PdfTaskData, void> = await Cluster.launch({
concurrency: Cluster.CONCURRENCY_PAGE,
maxConcurrency: 1,
timeout: 0,
puppeteerOptions: {
headless: true,
timeout: 0,
args: ["--no-sandbox", "--disable-setuid-sandbox"],
},
});
with the example above, currently any task will fail. Desired behavior would be that timeouts will never trigger.
I'm happy to open a PR if others also think this should be the case but want to hear if there are any differing opinions first
That would be great. Smaller than zero, like -1 would disable it, won't it?
0 timeout not timing out is often used in testing