repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge dependabot/npm_and_yarn/examples/typescript/websocket-server-pool/ws-hybrid...
[poolifier.git]
/
examples
/
typescript
/
http-server-pool
/
fastify-worker_threads
/
src
/
main.ts
diff --git
a/examples/typescript/http-server-pool/fastify-worker_threads/src/main.ts
b/examples/typescript/http-server-pool/fastify-worker_threads/src/main.ts
index 5610bc1d48bbadf0edee7b87b710d9feb5066d48..b9aba792c05a8e2459eecfac5a93457a4185da9a 100644
(file)
--- a/
examples/typescript/http-server-pool/fastify-worker_threads/src/main.ts
+++ b/
examples/typescript/http-server-pool/fastify-worker_threads/src/main.ts
@@
-12,11
+12,12
@@
import { fastifyPoolifier } from './fastify-poolifier.js'
const port = 8080
const fastify = Fastify({
const port = 8080
const fastify = Fastify({
- logger: true
+ logger: true
,
})
const workerFile = join(
dirname(fileURLToPath(import.meta.url)),
})
const workerFile = join(
dirname(fileURLToPath(import.meta.url)),
+ // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
`worker${extname(fileURLToPath(import.meta.url))}`
)
`worker${extname(fileURLToPath(import.meta.url))}`
)
@@
-24,11
+25,11
@@
await fastify.register(fastifyPoolifier, {
workerFile,
enableTasksQueue: true,
tasksQueueOptions: {
workerFile,
enableTasksQueue: true,
tasksQueueOptions: {
- concurrency: 8
+ concurrency: 8
,
},
errorHandler: (e: Error) => {
fastify.log.error('Thread worker error:', e)
},
errorHandler: (e: Error) => {
fastify.log.error('Thread worker error:', e)
- }
+ }
,
})
fastify.all('/api/echo', async request => {
})
fastify.all('/api/echo', async request => {