## [Unreleased]
-## [2.6.22] - 2023-08-10
+### Fixed
-## Changed
+- Fix pool busyness semantic when tasks queueing is enabled: the pool is busy when the number of executing tasks on each worker has reached the maximum tasks concurrency per worker.
-- Structure markdown documentation (PR #811).
+### Added
+
+- HTTP client pool examples: fetch, node-fetch and axios with multiple task functions.
+- HTTP server pool examples: express.
+
+## [2.6.22] - 2023-08-10
-## Fixed
+### Fixed
- Add missing `types` field to package.json `exports`.
+### Changed
+
+- Structure markdown documentation (PR #811).
+
## [2.6.21] - 2023-08-03
### Changed
protected abstract get busy (): boolean
/**
- * Whether worker nodes are executing at least one task.
+ * Whether worker nodes are executing concurrently their tasks quota or not.
*
* @returns Worker nodes busyness boolean status.
*/
protected internalBusy (): boolean {
- return (
- this.workerNodes.findIndex(
- workerNode =>
- workerNode.info.ready && workerNode.usage.tasks.executing === 0
- ) === -1
- )
+ if (this.opts.enableTasksQueue === true) {
+ return (
+ this.workerNodes.findIndex(
+ workerNode =>
+ workerNode.info.ready &&
+ workerNode.usage.tasks.executing <
+ (this.opts.tasksQueueOptions?.concurrency as number)
+ ) === -1
+ )
+ } else {
+ return (
+ this.workerNodes.findIndex(
+ workerNode =>
+ workerNode.info.ready && workerNode.usage.tasks.executing === 0
+ ) === -1
+ )
+ }
}
/** @inheritDoc */