refactor: remove unneeded intermediate variable
authorJérôme Benoit <jerome.benoit@sap.com>
Tue, 30 May 2023 11:18:13 +0000 (13:18 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Tue, 30 May 2023 11:18:13 +0000 (13:18 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/pools/abstract-pool.ts

index 4c82ef08a8cdad70602ebf20a64235b1cb3833f0..a84161af0dd401b8f6d40d6727286d3d20bb8b23 100644 (file)
@@ -424,8 +424,8 @@ export abstract class AbstractPool<
     worker: Worker,
     message: MessageValue<Response>
   ): void {
-    const workerNodeKey = this.getWorkerNodeKey(worker)
-    const workerTasksUsage = this.workerNodes[workerNodeKey].tasksUsage
+    const workerTasksUsage =
+      this.workerNodes[this.getWorkerNodeKey(worker)].tasksUsage
     --workerTasksUsage.running
     ++workerTasksUsage.run
     if (message.error != null) {