@crawlee/basic 3.17.1-beta.2 → 3.17.1-beta.21

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.
@@ -688,8 +688,12 @@ class BasicCrawler {
688
688
  finished = true;
689
689
  }
690
690
  periodicLogger.stop();
691
- // Don't await, we don't want to block the execution
692
- void this.setStatusMessage(`Finished! Total ${this.stats.state.requestsFinished + this.stats.state.requestsFailed} requests: ${this.stats.state.requestsFinished} succeeded, ${this.stats.state.requestsFailed} failed.`, { isStatusMessageTerminal: true, level: 'INFO' });
691
+ // Give the event loop a single tick to flush the HTTP
692
+ // 1ms is enough because we already have a keep-alive connection to the API
693
+ await Promise.race([
694
+ this.setStatusMessage(`Finished! Total ${this.stats.state.requestsFinished + this.stats.state.requestsFailed} requests: ${this.stats.state.requestsFinished} succeeded, ${this.stats.state.requestsFailed} failed.`, { isStatusMessageTerminal: true, level: 'INFO' }),
695
+ (0, utils_1.sleep)(1),
696
+ ]);
693
697
  this.running = false;
694
698
  this.hasFinishedBefore = true;
695
699
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crawlee/basic",
3
- "version": "3.17.1-beta.2",
3
+ "version": "3.17.1-beta.21",
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"
@@ -48,9 +48,9 @@
48
48
  "@apify/log": "^2.4.0",
49
49
  "@apify/timeout": "^0.3.0",
50
50
  "@apify/utilities": "^2.7.10",
51
- "@crawlee/core": "3.17.1-beta.2",
52
- "@crawlee/types": "3.17.1-beta.2",
53
- "@crawlee/utils": "3.17.1-beta.2",
51
+ "@crawlee/core": "3.17.1-beta.21",
52
+ "@crawlee/types": "3.17.1-beta.21",
53
+ "@crawlee/utils": "3.17.1-beta.21",
54
54
  "csv-stringify": "^6.2.0",
55
55
  "fs-extra": "^11.0.0",
56
56
  "got-scraping": "^4.2.1",
@@ -66,5 +66,5 @@
66
66
  }
67
67
  }
68
68
  },
69
- "gitHead": "4068bc2c385927bb7a0c8da93d06d9e1b63d1914"
69
+ "gitHead": "b315b66d9e3dffe8963cad291a85058ee0ef07c9"
70
70
  }