- this.opts.weights?.[
- this.nextWorkerNodeKey ?? this.previousWorkerNodeKey
- ] ?? this.defaultWorkerWeight
- if (this.workerVirtualTaskRunTime < workerWeight) {
- this.workerVirtualTaskRunTime =
- this.workerVirtualTaskRunTime +
- this.getWorkerTaskRunTime(
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+ this.opts!.weights![this.nextWorkerNodeKey ?? this.previousWorkerNodeKey]
+ if (this.workerNodeVirtualTaskExecutionTime < workerWeight) {
+ this.workerNodeVirtualTaskExecutionTime +=
+ this.getWorkerNodeTaskWaitTime(
+ this.nextWorkerNodeKey ?? this.previousWorkerNodeKey
+ ) +
+ this.getWorkerNodeTaskRunTime(