From: Jérôme Benoit Date: Mon, 11 Dec 2023 20:05:10 +0000 (+0100) Subject: refactor: disable pool event emitter for in cluster pool examples X-Git-Tag: v3.0.12~5 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=c5033c2df4fef157ccba4adaada5794b32e83f7f;p=poolifier.git refactor: disable pool event emitter for in cluster pool examples Signed-off-by: Jérôme Benoit --- diff --git a/examples/typescript/http-server-pool/express-cluster/src/main.ts b/examples/typescript/http-server-pool/express-cluster/src/main.ts index 7bdc56dab..512f8d377 100644 --- a/examples/typescript/http-server-pool/express-cluster/src/main.ts +++ b/examples/typescript/http-server-pool/express-cluster/src/main.ts @@ -12,6 +12,7 @@ const pool = new FixedClusterPool( availableParallelism(), workerFile, { + enableEvents: false, onlineHandler: () => { pool .execute({ port: 8080 }) diff --git a/examples/typescript/http-server-pool/express-hybrid/src/main.ts b/examples/typescript/http-server-pool/express-hybrid/src/main.ts index 561aab5d2..040fdc74f 100644 --- a/examples/typescript/http-server-pool/express-hybrid/src/main.ts +++ b/examples/typescript/http-server-pool/express-hybrid/src/main.ts @@ -17,6 +17,7 @@ const pool = new FixedClusterPool( availableParallelism(), expressWorkerFile, { + enableEvents: false, onlineHandler: () => { pool .execute({ diff --git a/examples/typescript/http-server-pool/fastify-cluster/src/main.ts b/examples/typescript/http-server-pool/fastify-cluster/src/main.ts index eb7720350..588adbedd 100644 --- a/examples/typescript/http-server-pool/fastify-cluster/src/main.ts +++ b/examples/typescript/http-server-pool/fastify-cluster/src/main.ts @@ -12,6 +12,7 @@ const pool = new FixedClusterPool( availableParallelism(), workerFile, { + enableEvents: false, onlineHandler: () => { pool .execute({ port: 8080 }) diff --git a/examples/typescript/http-server-pool/fastify-hybrid/src/main.ts b/examples/typescript/http-server-pool/fastify-hybrid/src/main.ts index b700bdbb8..d9a0015c6 100644 --- a/examples/typescript/http-server-pool/fastify-hybrid/src/main.ts +++ b/examples/typescript/http-server-pool/fastify-hybrid/src/main.ts @@ -17,6 +17,7 @@ const pool = new FixedClusterPool( Math.round(availableParallelism() / 2), fastifyWorkerFile, { + enableEvents: false, onlineHandler: () => { pool .execute({ diff --git a/examples/typescript/websocket-server-pool/ws-cluster/src/main.ts b/examples/typescript/websocket-server-pool/ws-cluster/src/main.ts index 5b4e7b5ea..695dc9545 100644 --- a/examples/typescript/websocket-server-pool/ws-cluster/src/main.ts +++ b/examples/typescript/websocket-server-pool/ws-cluster/src/main.ts @@ -12,6 +12,7 @@ const pool = new FixedClusterPool( availableParallelism(), workerFile, { + enableEvents: false, onlineHandler: () => { pool .execute({ port: 8080 }) diff --git a/examples/typescript/websocket-server-pool/ws-hybrid/src/main.ts b/examples/typescript/websocket-server-pool/ws-hybrid/src/main.ts index 0c31721a4..177d7d3b5 100644 --- a/examples/typescript/websocket-server-pool/ws-hybrid/src/main.ts +++ b/examples/typescript/websocket-server-pool/ws-hybrid/src/main.ts @@ -17,6 +17,7 @@ const pool = new FixedClusterPool( Math.round(availableParallelism() / 2), webSocketServerWorkerFile, { + enableEvents: false, onlineHandler: () => { pool .execute({