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

How to set unlimited timeout for task? #281

Open
twg-group opened this issue Apr 23, 2020 · 1 comment
Open

How to set unlimited timeout for task? #281

twg-group opened this issue Apr 23, 2020 · 1 comment

Comments

@twg-group
Copy link

twg-group commented Apr 23, 2020

Hello! In my case jobs will work about 2-3 hours or infinity, but i got timout...

Task for example:

(async ({page, data: lobby}) => {
    console.log(`start lobby ...`);
    let start;

    while (true) {
        await page.goto(lobby.url);
        if (page.url() !== lobby.url) {
            console.log(`${Date()} > No events`);
            await new Promise(res => setTimeout(res, lobby.noEventsSeekTimeout)); //5 seconds ... 1-3 hours
        }
// some other work and return
    }
})();

if possible, make please timeout: 0 in the ClusterOptions to unlimited loops... or some thing else...

@mat-twg
Copy link

mat-twg commented Apr 24, 2020

Launch tasks without timeout : option timeout to 0

mat-twg added a commit to mat-twg/puppeteer-cluster that referenced this issue Apr 24, 2020
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

1 participant