From b0317ac733b287e0e63ccfcf498c950462d7afad Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Fri, 19 Feb 2021 15:22:12 +0100 Subject: [PATCH] Revert poolifier update to beta. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- package-lock.json | 6 +++--- package.json | 2 +- src/charging-station/StationWorker.ts | 2 +- src/types/Worker.ts | 3 +-- 4 files changed, 6 insertions(+), 7 deletions(-) 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; -- 2.34.1