- this.opts.weights?.[this.nextWorkerNodeKey] ?? this.defaultWorkerWeight
- if (workerVirtualTaskRunTime < workerWeight) {
- this.workerVirtualTaskRunTime =
- workerVirtualTaskRunTime +
- this.getWorkerTaskRunTime(this.nextWorkerNodeKey)
+ this.opts.weights?.[
+ this.nextWorkerNodeKey ?? this.previousWorkerNodeKey
+ ] ?? this.defaultWorkerWeight
+ if (this.workerNodeVirtualTaskRunTime < workerWeight) {
+ this.workerNodeVirtualTaskRunTime =
+ this.workerNodeVirtualTaskRunTime +
+ this.getWorkerNodeTaskRunTime(
+ this.nextWorkerNodeKey ?? this.previousWorkerNodeKey
+ )