X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=examples%2Ftypescript%2Fwebsocket-server-pool%2Fws-cluster%2Fsrc%2Fmain.ts;h=34e2a58ba8e5fccd20da378cbbd69932bc9f47a1;hb=6bb2a64f78c7ba84e4d3690d18c2f8ca9e418069;hp=5b4e7b5eab6e9c2d3bda8d46610e02bde2eee3f2;hpb=fefd3cef3596e4e79dfeea1a1d6dfa39726e2ef5;p=poolifier.git 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..34e2a58b 100644 --- a/examples/typescript/websocket-server-pool/ws-cluster/src/main.ts +++ b/examples/typescript/websocket-server-pool/ws-cluster/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 { WorkerData, WorkerResponse } from './types.js' const workerFile = join( @@ -12,13 +14,13 @@ const pool = new FixedClusterPool( availableParallelism(), workerFile, { + enableEvents: false, onlineHandler: () => { pool .execute({ port: 8080 }) .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}` ) }