From b55c9112fb601a6b8d744ecbf7126ac6c97b8188 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sun, 29 Aug 2021 14:56:46 +0200 Subject: [PATCH] Add support for performance storage on worker pool MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Update poolifier to the latest version supporting the definition of a message handler on the workers. Signed-off-by: Jérôme Benoit --- package-lock.json | 6 +++--- package.json | 2 +- src/worker/WorkerFactory.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 54efe9e7..d370896d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11791,9 +11791,9 @@ } }, "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", diff --git a/package.json b/package.json index 018fb963..88d41d82 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/worker/WorkerFactory.ts b/src/worker/WorkerFactory.ts index 65d2f4d4..d97e9604 100644 --- a/src/worker/WorkerFactory.ts +++ b/src/worker/WorkerFactory.ts @@ -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; - // options?.messageHandler && options.poolOptions.messageHandler = options.messageHandler; + options?.messageHandler && (options.poolOptions.messageHandler = options.messageHandler); let workerImplementation: WorkerAbstract = null; switch (workerProcessType) { case WorkerProcessType.WORKER_SET: -- 2.34.1