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

I think a timeout of 0 should disable timeouts #511

Open
stoddabr opened this issue Feb 10, 2023 · 2 comments
Open

I think a timeout of 0 should disable timeouts #511

stoddabr opened this issue Feb 10, 2023 · 2 comments

Comments

@stoddabr
Copy link

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.

@stoddabr
Copy link
Author

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

@tamusjroyce
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants