Spaces:
Build error
Build error
fix
Browse files- src/api/crawler.ts +1 -0
- src/stand-alone/crawl.ts +0 -4
- src/stand-alone/search.ts +0 -4
- src/stand-alone/serp.ts +0 -4
src/api/crawler.ts
CHANGED
|
@@ -340,6 +340,7 @@ export class CrawlerHost extends RPCHost {
|
|
| 340 |
}
|
| 341 |
}
|
| 342 |
const crawlOpts = await this.configure(crawlerOptions);
|
|
|
|
| 343 |
if (crawlerOptions.robotsTxt) {
|
| 344 |
await this.robotsTxtService.assertAccessAllowed(targetUrl, crawlerOptions.robotsTxt);
|
| 345 |
}
|
|
|
|
| 340 |
}
|
| 341 |
}
|
| 342 |
const crawlOpts = await this.configure(crawlerOptions);
|
| 343 |
+
this.logger.info(`Accepting request from ${uid || ctx.ip}`, { opts: crawlerOptions });
|
| 344 |
if (crawlerOptions.robotsTxt) {
|
| 345 |
await this.robotsTxtService.assertAccessAllowed(targetUrl, crawlerOptions.robotsTxt);
|
| 346 |
}
|
src/stand-alone/crawl.ts
CHANGED
|
@@ -44,10 +44,6 @@ export class CrawlStandAloneServer extends KoaServer {
|
|
| 44 |
const ar = new AsyncResource('HTTP2ServerRequest');
|
| 45 |
ar.runInAsyncScope(fn, this.koaApp, req, res);
|
| 46 |
});
|
| 47 |
-
// HTTP2 p2p may break the load balancing
|
| 48 |
-
this.httpServer.updateSettings({
|
| 49 |
-
maxConcurrentStreams: 8,
|
| 50 |
-
});
|
| 51 |
// useResourceBasedDefaultTracker();
|
| 52 |
|
| 53 |
return this;
|
|
|
|
| 44 |
const ar = new AsyncResource('HTTP2ServerRequest');
|
| 45 |
ar.runInAsyncScope(fn, this.koaApp, req, res);
|
| 46 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
// useResourceBasedDefaultTracker();
|
| 48 |
|
| 49 |
return this;
|
src/stand-alone/search.ts
CHANGED
|
@@ -44,10 +44,6 @@ export class SearchStandAloneServer extends KoaServer {
|
|
| 44 |
const ar = new AsyncResource('HTTP2ServerRequest');
|
| 45 |
ar.runInAsyncScope(fn, this.koaApp, req, res);
|
| 46 |
});
|
| 47 |
-
// HTTP2 p2p may break the load balancing
|
| 48 |
-
this.httpServer.updateSettings({
|
| 49 |
-
maxConcurrentStreams: 8,
|
| 50 |
-
});
|
| 51 |
// useResourceBasedDefaultTracker();
|
| 52 |
|
| 53 |
return this;
|
|
|
|
| 44 |
const ar = new AsyncResource('HTTP2ServerRequest');
|
| 45 |
ar.runInAsyncScope(fn, this.koaApp, req, res);
|
| 46 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
// useResourceBasedDefaultTracker();
|
| 48 |
|
| 49 |
return this;
|
src/stand-alone/serp.ts
CHANGED
|
@@ -45,10 +45,6 @@ export class SERPStandAloneServer extends KoaServer {
|
|
| 45 |
const ar = new AsyncResource('HTTP2ServerRequest');
|
| 46 |
ar.runInAsyncScope(fn, this.koaApp, req, res);
|
| 47 |
});
|
| 48 |
-
// HTTP2 p2p may break the load balancing
|
| 49 |
-
this.httpServer.updateSettings({
|
| 50 |
-
maxConcurrentStreams: 50,
|
| 51 |
-
});
|
| 52 |
// useResourceBasedDefaultTracker();
|
| 53 |
|
| 54 |
return this;
|
|
|
|
| 45 |
const ar = new AsyncResource('HTTP2ServerRequest');
|
| 46 |
ar.runInAsyncScope(fn, this.koaApp, req, res);
|
| 47 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
// useResourceBasedDefaultTracker();
|
| 49 |
|
| 50 |
return this;
|