this.pool = new FixedThreadPool(
this.workerOptions.poolMaxSize,
this.workerScript,
- this.workerOptions.poolOptions
+ this.workerOptions.poolOptions,
);
}
public async addElement(elementData: WorkerData): Promise<void> {
await this.pool.execute(elementData);
// Start element sequentially to optimize memory at startup
- this.workerOptions.elementStartDelay > 0 && (await sleep(this.workerOptions.elementStartDelay));
+ this.workerOptions.elementStartDelay! > 0 &&
+ (await sleep(this.workerOptions.elementStartDelay!));
}
}