if (this.nextWorkerNodeId === workerNodeKey) {
if (this.pool.workerNodes.length === 0) {
this.nextWorkerNodeId = 0
- } else {
- this.nextWorkerNodeId =
- this.nextWorkerNodeId > this.pool.workerNodes.length - 1
- ? this.pool.workerNodes.length - 1
- : this.nextWorkerNodeId
+ } else if (this.nextWorkerNodeId > this.pool.workerNodes.length - 1) {
+ this.nextWorkerNodeId = this.pool.workerNodes.length - 1
}
}
return true
if (this.currentWorkerNodeId === workerNodeKey) {
if (this.pool.workerNodes.length === 0) {
this.currentWorkerNodeId = 0
- } else {
- this.currentWorkerNodeId =
- this.currentWorkerNodeId > this.pool.workerNodes.length - 1
- ? this.pool.workerNodes.length - 1
- : this.currentWorkerNodeId
+ } else if (this.currentWorkerNodeId > this.pool.workerNodes.length - 1) {
+ this.currentWorkerNodeId = this.pool.workerNodes.length - 1
}
this.workerVirtualTaskRunTime = 0
}