refactor: use default options values in fastify example
authorJérôme Benoit <jerome.benoit@sap.com>
Fri, 11 Aug 2023 19:36:38 +0000 (21:36 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Fri, 11 Aug 2023 19:36:38 +0000 (21:36 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
examples/typescript/http-server-pool/fastify/src/main.ts

index a71c0b76edf6530a44b9c4d535888a1e5c6fcb3a..c17de65b9628e3b818030ecb7a2259195c7da6db 100644 (file)
@@ -1,7 +1,6 @@
 import { dirname, extname, join } from 'node:path'
 import { fileURLToPath } from 'node:url'
 import Fastify from 'fastify'
-import { availableParallelism } from 'poolifier'
 import { fastifyPoolifier } from './fastify-poolifier.js'
 
 /**
@@ -20,8 +19,6 @@ const workerFile = join(
 
 await fastify.register(fastifyPoolifier, {
   workerFile,
-  minWorkers: 1,
-  maxWorkers: availableParallelism(),
   enableTasksQueue: true,
   tasksQueueOptions: {
     concurrency: 8