Skip to content

Commit

Permalink
fix: start status message logger after the crawl actually starts
Browse files Browse the repository at this point in the history
  • Loading branch information
B4nan committed Mar 30, 2023
1 parent 9c670a6 commit 5d1df7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/basic-crawler/src/internals/basic-crawler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,6 @@ export class BasicCrawler<Context extends CrawlingContext = BasicCrawlingContext
await this._init();
await this.stats.startCapturing();
const periodicLogger = this.getPeriodicLogger();
await periodicLogger.log();

const sigintHandler = async () => {
this.log.warning('Pausing... Press CTRL+C again to force exit. To resume, do: CRAWLEE_PURGE_ON_START=0 npm start');
Expand All @@ -677,6 +676,7 @@ export class BasicCrawler<Context extends CrawlingContext = BasicCrawlingContext

try {
this.log.info('Starting the crawl');
await periodicLogger.log();
await this.autoscaledPool!.run();
} finally {
await this.teardown();
Expand Down

0 comments on commit 5d1df7a

Please sign in to comment.