Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
- Use O(1) queue implementation for tasks queueing.
+### Fixed
+
+- Fix median computation implementation.
+- Fix fair share worker choice strategy internals update.
+
## [2.4.11] - 2023-04-23
### Changed
// return this.workerNodes.findLastIndex(workerNode => {
// return workerNode.tasksUsage.running === 0
// })
- for (let i = this.pool.workerNodes.length - 1; i >= 0; i--) {
- if (this.pool.workerNodes[i].tasksUsage.running === 0) {
- return i
+ for (
+ let workerNodeKey = this.pool.workerNodes.length - 1;
+ workerNodeKey >= 0;
+ workerNodeKey--
+ ) {
+ if (this.pool.workerNodes[workerNodeKey].tasksUsage.running === 0) {
+ return workerNodeKey
}
}
return -1