X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=examples%2Ftypescript%2Fwebsocket-server-pool%2Fws-hybrid%2Fsrc%2Fmain.ts;h=9e6638994c9513d487a22b38b7c9ac7faa9b366f;hb=ded253e27e59ae936fe91d789d8454b7eb11dd6a;hp=0c31721a417c575c65342c41cfad5ef837e8103c;hpb=fefd3cef3596e4e79dfeea1a1d6dfa39726e2ef5;p=poolifier.git 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..9e663899 100644 --- a/examples/typescript/websocket-server-pool/ws-hybrid/src/main.ts +++ b/examples/typescript/websocket-server-pool/ws-hybrid/src/main.ts @@ -1,6 +1,8 @@ import { dirname, extname, join } from 'node:path' import { fileURLToPath } from 'node:url' -import { FixedClusterPool, availableParallelism } from 'poolifier' + +import { availableParallelism, FixedClusterPool } from 'poolifier' + import type { ClusterWorkerData, ClusterWorkerResponse } from './types.js' const webSocketServerWorkerFile = join( @@ -17,6 +19,7 @@ const pool = new FixedClusterPool( Math.round(availableParallelism() / 2), webSocketServerWorkerFile, { + enableEvents: false, onlineHandler: () => { pool .execute({ @@ -37,7 +40,6 @@ const pool = new FixedClusterPool( .then(response => { if (response.status) { console.info( - // eslint-disable-next-line @typescript-eslint/restrict-template-expressions `WebSocket server is listening in cluster worker on port ${response.port}` ) }