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/http-server-pool/fastify-worker_thr...
[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 7db0b5196d973b98b51e6ac37dea5d12af9bbbf1..724836de7ef6fb5287e511a59d5cbe71cb360c22 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
@@
-1,5
+1,6
@@
import { dirname, extname, join } from 'node:path'
import { fileURLToPath } from 'node:url'
import { dirname, extname, join } from 'node:path'
import { fileURLToPath } from 'node:url'
+import { exit } from 'node:process'
import Fastify from 'fastify'
import { fastifyPoolifier } from './fastify-poolifier.js'
import Fastify from 'fastify'
import { fastifyPoolifier } from './fastify-poolifier.js'
@@
-24,7
+25,7
@@
await fastify.register(fastifyPoolifier, {
concurrency: 8
},
errorHandler: (e: Error) => {
concurrency: 8
},
errorHandler: (e: Error) => {
- fastify.log.error(e)
+ fastify.log.error(
'Thread worker error:',
e)
}
})
}
})
@@
-43,5
+44,5
@@
try {
await fastify.listen({ port })
} catch (err) {
fastify.log.error(err)
await fastify.listen({ port })
} catch (err) {
fastify.log.error(err)
-
process.
exit(1)
+ exit(1)
}
}