Skip to content

Commit

Permalink
fix: respect current config when creating implicit RequestQueue ins…
Browse files Browse the repository at this point in the history
…tance

Closes #2043
  • Loading branch information
B4nan committed Aug 25, 2023
1 parent 25a81c1 commit 845141d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/basic-crawler/src/internals/basic-crawler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ export class BasicCrawler<Context extends CrawlingContext = BasicCrawlingContext
// ignored - as a failed requests is still handled.
if (this.running === false && this.requestQueue?.name === 'default' && purgeRequestQueue) {
await this.requestQueue.drop();
this.requestQueue = await RequestQueue.open();
this.requestQueue = await RequestQueue.open(null, { config: this.config });
}

this.running = true;
Expand Down Expand Up @@ -850,7 +850,7 @@ export class BasicCrawler<Context extends CrawlingContext = BasicCrawlingContext
}

async getRequestQueue() {
this.requestQueue ??= await RequestQueue.open();
this.requestQueue ??= await RequestQueue.open(null, { config: this.config });

return this.requestQueue!;
}
Expand Down

0 comments on commit 845141d

Please sign in to comment.