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