Crawlee—A web scraping and browser automation library for Node.js to build reliable crawlers. In JavaScript and TypeScript. Extract data for AI, LLMs, RAG, or GPTs. Download HTML, PDF, JPG, PNG, and other files from websites. Works with Puppeteer, Playwright, Cheerio, JSDOM, and raw HTTP. Both headful and headless mode. With proxy rotation.
TypeScript apifyautomationcrawlercrawlingheadlessheadless-chromejavascriptnodejsnpmplaywrightpuppeteerscraperscrapingtypescriptweb-crawlerweb-crawlingweb-scraping
fix: Use the correct mutex in memory storage RequestQueueClient (#2623)
Jan Buchar2fa8a29b8156
diff --git a/packages/memory-storage/src/resource-clients/request-queue.ts b/packages/memory-storage/src/resource-clients/request-queue.tsindex 8f09c80e7..0127ec3e9 100644--- a/packages/memory-storage/src/resource-clients/request-queue.ts+++ b/packages/memory-storage/src/resource-clients/request-queue.ts@@ -214,7 +214,7 @@ export class RequestQueueClient extends BaseClient implements storage.RequestQueconst items = [];- await this.mutex.wait();+ await queue.mutex.wait();try {for (const storageEntry of queue.requests.values()) {@@ -248,7 +248,7 @@ export class RequestQueueClient extends BaseClient implements storage.RequestQueitems: items.map(({ json }) => this._jsonToRequest(json)!),};} finally {- this.mutex.shift();+ queue.mutex.shift();}}