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 7bdc56da..512f8d37 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 561aab5d..040fdc74 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 eb772035..588adbed 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 b700bdbb..d9a0015c 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 5b4e7b5e..695dc954 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 0c31721a..177d7d3b 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({