refactor: disable pool event emitter for in cluster pool examples
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 11 Dec 2023 20:05:10 +0000 (21:05 +0100)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 11 Dec 2023 20:05:10 +0000 (21:05 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
examples/typescript/http-server-pool/express-cluster/src/main.ts
examples/typescript/http-server-pool/express-hybrid/src/main.ts
examples/typescript/http-server-pool/fastify-cluster/src/main.ts
examples/typescript/http-server-pool/fastify-hybrid/src/main.ts
examples/typescript/websocket-server-pool/ws-cluster/src/main.ts
examples/typescript/websocket-server-pool/ws-hybrid/src/main.ts

index 7bdc56dab057e6b2bffa02d3d6085970f0244fd5..512f8d377f696f4c0534dbe381b110f827a6a72e 100644 (file)
@@ -12,6 +12,7 @@ const pool = new FixedClusterPool<WorkerData, WorkerResponse>(
   availableParallelism(),
   workerFile,
   {
+    enableEvents: false,
     onlineHandler: () => {
       pool
         .execute({ port: 8080 })
index 561aab5d2832217f50ec4304a858cc94bb72c40a..040fdc74fea5d88b24474672128cc5988ffcc019 100644 (file)
@@ -17,6 +17,7 @@ const pool = new FixedClusterPool<ClusterWorkerData, ClusterWorkerResponse>(
   availableParallelism(),
   expressWorkerFile,
   {
+    enableEvents: false,
     onlineHandler: () => {
       pool
         .execute({
index eb7720350077b69d28918356389022b9d3c874ce..588adbedd44539fb8488ec22c616da1a955d7a44 100644 (file)
@@ -12,6 +12,7 @@ const pool = new FixedClusterPool<WorkerData, WorkerResponse>(
   availableParallelism(),
   workerFile,
   {
+    enableEvents: false,
     onlineHandler: () => {
       pool
         .execute({ port: 8080 })
index b700bdbb8bbcff9ff441960e5940c2d42c4c635a..d9a0015c637d528703902440ec0e986d5cc86450 100644 (file)
@@ -17,6 +17,7 @@ const pool = new FixedClusterPool<ClusterWorkerData, ClusterWorkerResponse>(
   Math.round(availableParallelism() / 2),
   fastifyWorkerFile,
   {
+    enableEvents: false,
     onlineHandler: () => {
       pool
         .execute({
index 5b4e7b5eab6e9c2d3bda8d46610e02bde2eee3f2..695dc9545c99dcb308d35a5ceda62b5e87dc887b 100644 (file)
@@ -12,6 +12,7 @@ const pool = new FixedClusterPool<WorkerData, WorkerResponse>(
   availableParallelism(),
   workerFile,
   {
+    enableEvents: false,
     onlineHandler: () => {
       pool
         .execute({ port: 8080 })
index 0c31721a417c575c65342c41cfad5ef837e8103c..177d7d3b5813f04ff10dd8812f8eafeec1099407 100644 (file)
@@ -17,6 +17,7 @@ const pool = new FixedClusterPool<ClusterWorkerData, ClusterWorkerResponse>(
   Math.round(availableParallelism() / 2),
   webSocketServerWorkerFile,
   {
+    enableEvents: false,
     onlineHandler: () => {
       pool
         .execute({