strategy startup
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
let lessBusyWorkerKey!: number
for (const [index, workerItem] of this.pool.workers.entries()) {
const workerRunTime = workerItem.tasksUsage.runTime
- if (!this.isDynamicPool && workerRunTime === 0) {
+ if (workerRunTime === 0) {
return index
} else if (workerRunTime < minRunTime) {
minRunTime = workerRunTime
for (const [index, workerItem] of this.pool.workers.entries()) {
const tasksUsage = workerItem.tasksUsage
const workerTasks = tasksUsage?.run + tasksUsage?.running
- if (!this.isDynamicPool && workerTasks === 0) {
+ if (workerTasks === 0) {
return index
} else if (workerTasks < minNumberOfTasks) {
minNumberOfTasks = workerTasks