X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2FWorker.ts;h=05dc41583d3c6c9e63427fd5cd7af8c84e596498;hb=7c72977bb3400f474c8641fc91d9f54fba25cb64;hp=4654fdcf6c57b7bf652773d60952ac112a5b6a8b;hpb=4bfd80fa794b4b2f89427ef9f5944664ce3bdade;p=e-mobility-charging-stations-simulator.git diff --git a/src/types/Worker.ts b/src/types/Worker.ts index 4654fdcf..05dc4158 100644 --- a/src/types/Worker.ts +++ b/src/types/Worker.ts @@ -1,11 +1,11 @@ -import { JsonType } from './JsonType'; +import { JsonObject } from './JsonType'; import { PoolOptions } from 'poolifier'; import { Worker } from 'worker_threads'; export enum WorkerProcessType { WORKER_SET = 'workerSet', DYNAMIC_POOL = 'dynamicPool', - STATIC_POOL = 'staticPool' + STATIC_POOL = 'staticPool', } export interface WorkerOptions { @@ -18,12 +18,7 @@ export interface WorkerOptions { messageHandler?: (message: unknown) => void | Promise; } -export interface WorkerStartOptions { - workerStartDelay: number; - elementStartDelay: number; -} - -export type WorkerData = JsonType; +export type WorkerData = JsonObject; export interface WorkerSetElement { worker: Worker; @@ -37,6 +32,5 @@ export interface WorkerMessage { export enum WorkerMessageEvents { START_WORKER_ELEMENT = 'startWorkerElement', - STOP_WORKER_ELEMENT = 'stopWorkerElement' + STOP_WORKER_ELEMENT = 'stopWorkerElement', } -