From: Jérôme Benoit Date: Tue, 14 May 2024 11:41:58 +0000 (+0200) Subject: refactor: cleanup handleWorkerNodeBackPressureEvent() X-Git-Tag: v4.0.8~6 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=7b2c562719a6138d9e92cf17af05852e3828d871;p=poolifier.git refactor: cleanup handleWorkerNodeBackPressureEvent() Signed-off-by: Jérôme Benoit --- diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index e1042885..52bd73be 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -1899,12 +1899,12 @@ export abstract class AbstractPool< ) { return } - const { workerId } = eventDetail const sizeOffset = 1 // eslint-disable-next-line @typescript-eslint/no-non-null-assertion if (this.opts.tasksQueueOptions!.size! <= sizeOffset) { return } + const { workerId } = eventDetail const sourceWorkerNode = this.workerNodes[this.getWorkerNodeKeyByWorkerId(workerId)] const workerNodes = this.workerNodes