fix: do not check for pool destroying statuses at task redistribution
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Tue, 14 Nov 2023 20:52:03 +0000 (21:52 +0100)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Tue, 14 Nov 2023 20:52:03 +0000 (21:52 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
.c8rc.json
src/pools/abstract-pool.ts

index 29100bb26408a1226a5c4dc10cf04e3e8e0736a9..78e101256903834fedb282b59d196eb174d9d406 100644 (file)
@@ -1,7 +1,7 @@
 {
   "check-coverage": true,
-  "lines": 94,
-  "statements": 94,
+  "lines": 93,
+  "statements": 93,
   "functions": 95,
   "branches": 92
 }
index 5392914d002060b9734ea35eae0d0931f67f5f17..b09b81aee096065eed5d5582a117d05eea6e7e8f 100644 (file)
@@ -1266,11 +1266,7 @@ export abstract class AbstractPool<
           this.createAndSetupWorkerNode()
         }
       }
-      if (
-        this.started &&
-        !this.destroying &&
-        this.opts.enableTasksQueue === true
-      ) {
+      if (this.started && this.opts.enableTasksQueue === true) {
         this.redistributeQueuedTasks(workerNodeKey)
       }
     })