Revert poolifier update to beta.
authorJérôme Benoit <jerome.benoit@sap.com>
Fri, 19 Feb 2021 14:22:12 +0000 (15:22 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Fri, 19 Feb 2021 14:22:12 +0000 (15:22 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
package-lock.json
package.json
src/charging-station/StationWorker.ts
src/types/Worker.ts

index eaa3bdf52697c3c4a0c719b3c633e71d69b84e0b..9422b33604296c2245cd4354d6ed7e7902fb07f4 100644 (file)
       }
     },
     "poolifier": {
-      "version": "2.0.0-beta.5",
-      "resolved": "https://registry.npmjs.org/poolifier/-/poolifier-2.0.0-beta.5.tgz",
-      "integrity": "sha512-dGaWRZ6H3VAitl4KaBXH3AJ6RLQMk4T9ufo2KFYsabsUrY8Gd2clOY+rU8kxWNk+Eel6f8QEdjsDmasGfQXoOA=="
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/poolifier/-/poolifier-1.2.1.tgz",
+      "integrity": "sha512-kUH3JlLLO7JdAnRdtbgaSME5WDxgDzAuUk9+hapVHfXeI0VjpeuLnxLL8cUF7lEgrUE4m59scr5TFx5ajbPqXQ=="
     },
     "postcss": {
       "version": "8.1.10",
index 668d110618d205998392168efc7b4da38a99eb89..e7d87c388b5283eda11e643de32dd8eaf654e476 100644 (file)
@@ -48,7 +48,7 @@
   },
   "dependencies": {
     "mongodb": "^3.6.4",
-    "poolifier": "^2.0.0-beta.5",
+    "poolifier": "^1.2.1",
     "source-map-support": "^0.5.19",
     "tslib": "^2.1.0",
     "uuid": "^8.3.2",
index 1073fcab94fa77fe2babf41ad3fd7aabcbb8e6b5..31452ce0149225884e64d92943625fe775e0102a 100644 (file)
@@ -9,7 +9,7 @@ import Utils from '../utils/Utils';
 // Conditionally export ThreadWorker instance for pool usage
 export let threadWorker;
 if (Utils.workerPoolInUse()) {
-  threadWorker = new ThreadWorker(startChargingStation, { maxInactiveTime: Constants.WORKER_POOL_MAX_INACTIVE_TIME, async: false });
+  threadWorker = new ThreadWorker<StationWorkerData>(startChargingStation, { maxInactiveTime: Constants.WORKER_POOL_MAX_INACTIVE_TIME, async: false });
 }
 
 if (!isMainThread) {
index fad707704b37a824fcb826962b7b6a94f4e213dd..bc2972684c0cb2677f34176ffbd11b119392d423 100644 (file)
@@ -1,4 +1,3 @@
-import { JSONValue } from 'poolifier';
 import { Worker } from 'worker_threads';
 
 export enum WorkerProcessType {
@@ -13,7 +12,7 @@ export interface WorkerOptions {
   elementsPerWorker?: number;
 }
 
-export type WorkerData = JSONValue;
+export interface WorkerData { }
 
 export interface StationWorkerData extends WorkerData {
   index: number;