Add support for performance storage on worker pool
authorJérôme Benoit <jerome.benoit@sap.com>
Sun, 29 Aug 2021 12:56:46 +0000 (14:56 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Sun, 29 Aug 2021 12:56:46 +0000 (14:56 +0200)
Update poolifier to the latest version supporting the definition of a message
handler on the workers.

Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
package-lock.json
package.json
src/worker/WorkerFactory.ts

index 54efe9e720f65d85b92616286db5439fc6fe0c49..d370896dc4eb720006a2fc9dcd121dc2d3b0f5cb 100644 (file)
       }
     },
     "poolifier": {
-      "version": "2.0.2",
-      "resolved": "https://registry.npmjs.org/poolifier/-/poolifier-2.0.2.tgz",
-      "integrity": "sha512-qibRFXZlhYJYf/jIoayoOb31S8EeMDF89H9ujOQh1xOxLreYZ0EzCEnnOR8OdpdAxyl+JKyt7sgFLHK78WTV5w=="
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/poolifier/-/poolifier-2.1.0.tgz",
+      "integrity": "sha512-tUYviyPvVLnnxdL0ROKwTohZfbf4HGldRwO2Qw4X0wrO/X3eZIbs5OELW7tMqPN3BdmbYI7JdIWfw4woQRf+rQ=="
     },
     "postcss": {
       "version": "8.2.15",
index 018fb963d21c9feb2820da8663bb0b1863a852d1..88d41d82afc2cc4e293e19b6d4ead49c6d8a03fc 100644 (file)
@@ -67,7 +67,7 @@
     "chalk": "^4.1.2",
     "mongodb": "^4.1.1",
     "mysql2": "^2.3.0",
-    "poolifier": "^2.0.2",
+    "poolifier": "^2.1.0",
     "reflect-metadata": "^0.1.13",
     "source-map-support": "^0.5.19",
     "sqlite3": "^5.0.2",
index 65d2f4d4050c761c4ffb69fe323be00449141a6a..d97e9604da5fe987eb63d0ce556ed6325fd391d8 100644 (file)
@@ -21,7 +21,7 @@ export default class WorkerFactory {
     options = options ?? {} as WorkerOptions;
     options.startDelay = options.startDelay ?? Constants.WORKER_START_DELAY;
     options.poolOptions = options?.poolOptions ?? {} as PoolOptions<Worker>;
-    // options?.messageHandler && options.poolOptions.messageHandler = options.messageHandler;
+    options?.messageHandler && (options.poolOptions.messageHandler = options.messageHandler);
     let workerImplementation: WorkerAbstract = null;
     switch (workerProcessType) {
       case WorkerProcessType.WORKER_SET: