- InternalWorkerChoiceStrategyOptions,
- TaskStatisticsRequirements
+ TaskStatisticsRequirements,
+ WorkerChoiceStrategyOptions
/** @inheritDoc */
public constructor (
pool: IPool<Worker, Data, Response>,
/** @inheritDoc */
public constructor (
pool: IPool<Worker, Data, Response>,
- const workerWeight = this.opts.weights?.[
- this.nextWorkerNodeKey ?? this.previousWorkerNodeKey
- ] as number
+ const workerWeight =
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+ this.opts!.weights![this.nextWorkerNodeKey ?? this.previousWorkerNodeKey]!
if (this.workerNodeVirtualTaskRunTime < workerWeight) {
this.workerNodeVirtualTaskRunTime =
this.workerNodeVirtualTaskRunTime +
if (this.workerNodeVirtualTaskRunTime < workerWeight) {
this.workerNodeVirtualTaskRunTime =
this.workerNodeVirtualTaskRunTime +