mirror of
https://git.mirrors.martin98.com/https://github.com/jina-ai/reader.git
synced 2025-08-19 20:59:07 +08:00
fix: request blocker
This commit is contained in:
parent
dceb361a7a
commit
c4be29b1da
@ -470,9 +470,6 @@ class PageReqCtrlKit {
|
|||||||
|
|
||||||
onFinishRequest(req: HTTPRequest) {
|
onFinishRequest(req: HTTPRequest) {
|
||||||
this.reqSet.delete(req);
|
this.reqSet.delete(req);
|
||||||
if (this.reqSet.size > this.concurrency) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const deferred = this.blockers.shift();
|
const deferred = this.blockers.shift();
|
||||||
deferred?.resolve();
|
deferred?.resolve();
|
||||||
}
|
}
|
||||||
@ -542,7 +539,7 @@ export class PuppeteerControl extends AsyncService {
|
|||||||
}
|
}
|
||||||
this.browser = await puppeteer.launch({
|
this.browser = await puppeteer.launch({
|
||||||
timeout: 10_000,
|
timeout: 10_000,
|
||||||
headless: true,
|
headless: false,
|
||||||
executablePath: process.env.OVERRIDE_CHROME_EXECUTABLE_PATH,
|
executablePath: process.env.OVERRIDE_CHROME_EXECUTABLE_PATH,
|
||||||
args: ['--disable-dev-shm-usage']
|
args: ['--disable-dev-shm-usage']
|
||||||
}).catch((err: any) => {
|
}).catch((err: any) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user