repositories
/
e-mobility-charging-stations-simulator.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
45bd062
)
Ensure that workerSet always properly start a worker at init
author
Jérôme Benoit
<jerome.benoit@sap.com>
Thu, 2 Jun 2022 22:41:53 +0000
(
00:41
+0200)
committer
Jérôme Benoit
<jerome.benoit@sap.com>
Thu, 2 Jun 2022 22:41:53 +0000
(
00:41
+0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/worker/WorkerSet.ts
patch
|
blob
|
blame
|
history
diff --git
a/src/worker/WorkerSet.ts
b/src/worker/WorkerSet.ts
index 6e890902d8f8c769e726a262e5c013c39334b604..73014977070673616607821928e86ad0bd88af0d 100644
(file)
--- a/
src/worker/WorkerSet.ts
+++ b/
src/worker/WorkerSet.ts
@@
-46,6
+46,7
@@
export default class WorkerSet extends WorkerAbstract<WorkerData> {
throw new Error("Cannot add a WorkerSet element: workers' set does not exist");
}
if (
+ this.workerSet.size === 0 ||
this.getLastWorkerSetElement().numberOfWorkerElements >= this.workerOptions.elementsPerWorker
) {
await this.startWorker();