/** @inheritDoc */
public update (workerNodeKey: number): boolean {
this.computeWorkerVirtualTaskEndTimestamp(workerNodeKey)
+ return true
+ }
+
+ /** @inheritDoc */
+ public choose (): number {
let minWorkerVirtualTaskEndTimestamp = Infinity
for (const [workerNodeKey] of this.pool.workerNodes.entries()) {
if (this.workersVirtualTaskEndTimestamp[workerNodeKey] == null) {
this.nextWorkerNodeId = workerNodeKey
}
}
- return true
- }
-
- /** @inheritDoc */
- public choose (): number {
return this.nextWorkerNodeId
}