From: Jérôme Benoit Date: Fri, 19 Feb 2021 14:22:12 +0000 (+0100) Subject: Revert poolifier update to beta. X-Git-Tag: v1.0.1-0~103^2~7 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=b0317ac733b287e0e63ccfcf498c950462d7afad;p=e-mobility-charging-stations-simulator.git Revert poolifier update to beta. Signed-off-by: Jérôme Benoit --- diff --git a/package-lock.json b/package-lock.json index eaa3bdf5..9422b336 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7322,9 +7322,9 @@ } }, "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", diff --git a/package.json b/package.json index 668d1106..e7d87c38 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/charging-station/StationWorker.ts b/src/charging-station/StationWorker.ts index 1073fcab..31452ce0 100644 --- a/src/charging-station/StationWorker.ts +++ b/src/charging-station/StationWorker.ts @@ -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(startChargingStation, { maxInactiveTime: Constants.WORKER_POOL_MAX_INACTIVE_TIME, async: false }); } if (!isMainThread) { diff --git a/src/types/Worker.ts b/src/types/Worker.ts index fad70770..bc297268 100644 --- a/src/types/Worker.ts +++ b/src/types/Worker.ts @@ -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;