@crawlee/core 3.18.2-beta.1 → 3.18.2-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -450,7 +450,10 @@ class AutoscaledPool {
450
450
  * every `maybeRunIntervalSecs` seconds. If you want to trigger the processing immediately, use this method.
451
451
  */
452
452
  async notify() {
453
- setImmediate(this._maybeRunTask);
453
+ // `notify()` can be called from within a running task (e.g. a request handler), in which case
454
+ // `@apify/timeout`'s AsyncLocalStorage context of that task - possibly already timed out - would
455
+ // otherwise leak into the deferred `_maybeRunTask()` call and abort unrelated tasks it starts.
456
+ timeout_1.storage.exit(() => setImmediate(this._maybeRunTask));
454
457
  }
455
458
  /**
456
459
  * Starts a new task
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crawlee/core",
3
- "version": "3.18.2-beta.1",
3
+ "version": "3.18.2-beta.3",
4
4
  "description": "The scalable web crawling and scraping library for JavaScript/Node.js. Enables development of data extraction and web automation jobs (not only) with headless Chrome and Puppeteer.",
5
5
  "engines": {
6
6
  "node": ">=16.0.0"
@@ -59,9 +59,9 @@
59
59
  "@apify/pseudo_url": "^2.0.30",
60
60
  "@apify/timeout": "^0.4.0",
61
61
  "@apify/utilities": "^2.7.10",
62
- "@crawlee/memory-storage": "3.18.2-beta.1",
63
- "@crawlee/types": "3.18.2-beta.1",
64
- "@crawlee/utils": "3.18.2-beta.1",
62
+ "@crawlee/memory-storage": "3.18.2-beta.3",
63
+ "@crawlee/types": "3.18.2-beta.3",
64
+ "@crawlee/utils": "3.18.2-beta.3",
65
65
  "@sapphire/async-queue": "^1.5.1",
66
66
  "@standard-schema/spec": "^1.0.0",
67
67
  "@vladfrangu/async_event_emitter": "^2.2.2",
@@ -84,5 +84,5 @@
84
84
  }
85
85
  }
86
86
  },
87
- "gitHead": "5d2fea5f9d24029d1cc8435132556f4c93d2a20b"
87
+ "gitHead": "feed328453d1967b36ccd45cc4531d44498915b8"
88
88
  }