From: Jérôme Benoit Date: Wed, 14 Aug 2024 12:50:46 +0000 (+0200) Subject: refactor: remove unneeded condition at task response handling X-Git-Tag: v4.2.1~4 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=93df097ec6c54af9f0d29df0cb61cb901f29fca4;p=poolifier.git refactor: remove unneeded condition at task response handling Signed-off-by: Jérôme Benoit --- diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index 61f01a6e..8f7a6e47 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -2149,12 +2149,7 @@ export abstract class AbstractPool< // eslint-disable-next-line @typescript-eslint/no-non-null-assertion this.promiseResponseMap.delete(taskId!) workerNode.emit('taskFinished', taskId) - if ( - this.opts.enableTasksQueue === true && - !this.destroying && - // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition - workerNode != null - ) { + if (this.opts.enableTasksQueue === true && !this.destroying) { const workerNodeTasksUsage = workerNode.usage.tasks if ( this.tasksQueueSize(workerNodeKey) > 0 &&