repositories
/
e-mobility-charging-stations-simulator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Version 1.1.10
[e-mobility-charging-stations-simulator.git]
/
src
/
types
/
Worker.ts
diff --git
a/src/types/Worker.ts
b/src/types/Worker.ts
index c1f6f0c89ae3c197d26eb1a37c6fa3edb2c1c328..8f47f57818e6e8b968bc10dce0c5bc21552df56e 100644
(file)
--- a/
src/types/Worker.ts
+++ b/
src/types/Worker.ts
@@
-13,22
+13,24
@@
export interface WorkerOptions {
poolMinSize?: number;
elementsPerWorker?: number;
poolOptions?: PoolOptions<Worker>;
poolMinSize?: number;
elementsPerWorker?: number;
poolOptions?: PoolOptions<Worker>;
+ messageHandler?: (message: unknown) => void | Promise<void>;
}
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface WorkerData {}
}
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface WorkerData {}
-export interface
StationWorkerData extends WorkerData
{
-
index: numb
er;
-
templateFile: string
;
+export interface
WorkerSetElement
{
+
worker: Work
er;
+
numberOfWorkerElements: number
;
}
}
-export interface Worker
SetElement
{
- worker: Worker,
- numberOfWorkerElements: number
+export interface Worker
Message
{
+ id: WorkerMessageEvents;
+ data: any;
}
}
-export enum WorkerEvents {
+export enum Worker
Message
Events {
START_WORKER_ELEMENT = 'startWorkerElement',
START_WORKER_ELEMENT = 'startWorkerElement',
+ STOP_WORKER_ELEMENT = 'stopWorkerElement'
}
}