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
Will it be delayed for 20 seconds? #11
Comments
Thanks you for asking. This is a bug. Normally it should work like this:
But currently (buggy behavior) it works like this (in case there are 2 workers): This is not intended. Will be fixed soon. |
Have a look at version |
I updated to the latest version,
|
Will investigate (see #13). |
Fixed in v0.11.2 (just released). Thank you for finding all these little bugs @kanxue660 :) |
The code is as follows
const { Cluster } = require('puppeteer-cluster');
(async () => {
const cluster = await Cluster.launch({
concurrency: Cluster.CONCURRENCY_CONTEXT,
maxConcurrency: 2,
sameDomainDelay:20*1000 //Will it be delayed for 20 seconds?
});
await cluster.task(async ({ page, data: url }) => {
await page.goto(url);
const screen = await page.screenshot();
// Store screenshot, do something else
});
await cluster.queue('http://www.google.com/a.html');
await cluster.queue('http://www.google.com/b.html');
await cluster.queue('http://www.google.com/c.html');
// many more pages
await cluster.idle();
await cluster.close();
})();
My question is, if a.HTML opens first, then B.Html,c.HTML, will be delayed 20 seconds to open it?
Do not understand how this sameDomainDelay uses
The text was updated successfully, but these errors were encountered: