@crawlee/core 3.17.1-beta.47 → 3.17.1-beta.48

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.
@@ -415,14 +415,17 @@ class AutoscaledPool {
415
415
  this.isStopped = true;
416
416
  await new Promise((resolve, reject) => {
417
417
  let timeout;
418
+ let interval;
418
419
  if (timeoutSecs) {
419
420
  timeout = setTimeout(() => {
421
+ // Clean up the polling interval to prevent it from leaking on timeout.
422
+ clearInterval(interval);
420
423
  const err = new Error("The pool's running tasks did not finish" +
421
424
  `in ${timeoutSecs} secs after pool.pause() invocation.`);
422
425
  reject(err);
423
426
  }, timeoutSecs);
424
427
  }
425
- const interval = setInterval(() => {
428
+ interval = setInterval(() => {
426
429
  if (this._currentConcurrency <= 0) {
427
430
  // Clean up timeout and interval to prevent process hanging.
428
431
  if (timeout)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crawlee/core",
3
- "version": "3.17.1-beta.47",
3
+ "version": "3.17.1-beta.48",
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.3.0",
61
61
  "@apify/utilities": "^2.7.10",
62
- "@crawlee/memory-storage": "3.17.1-beta.47",
63
- "@crawlee/types": "3.17.1-beta.47",
64
- "@crawlee/utils": "3.17.1-beta.47",
62
+ "@crawlee/memory-storage": "3.17.1-beta.48",
63
+ "@crawlee/types": "3.17.1-beta.48",
64
+ "@crawlee/utils": "3.17.1-beta.48",
65
65
  "@sapphire/async-queue": "^1.5.1",
66
66
  "@vladfrangu/async_event_emitter": "^2.2.2",
67
67
  "csv-stringify": "^6.2.0",
@@ -83,5 +83,5 @@
83
83
  }
84
84
  }
85
85
  },
86
- "gitHead": "93d7b6fccbd6e4f4b474adbba55e5f05051bbaf2"
86
+ "gitHead": "69be990c8513de457578d3d60e00b9129e4e5f0c"
87
87
  }