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
/
smtp-client-pool
/
src
/
pool.ts
diff --git
a/examples/typescript/smtp-client-pool/src/pool.ts
b/examples/typescript/smtp-client-pool/src/pool.ts
index ec2ec1367c5f0219dd8f685d3977e1f61d0ddf7a..315bf4eab77274267d4f7928973b9d8733e5ec28 100644
(file)
--- a/
examples/typescript/smtp-client-pool/src/pool.ts
+++ b/
examples/typescript/smtp-client-pool/src/pool.ts
@@
-1,8
+1,10
@@
-import { fileURLToPath } from 'node:url'
import { dirname, extname, join } from 'node:path'
import { dirname, extname, join } from 'node:path'
-import { DynamicThreadPool, availableParallelism } from 'poolifier'
+import { fileURLToPath } from 'node:url'
+
import type SMTPTransport from 'nodemailer/lib/smtp-transport/index.js'
import type SMTPTransport from 'nodemailer/lib/smtp-transport/index.js'
-import { type WorkerData } from './types.js'
+import { availableParallelism, DynamicThreadPool } from 'poolifier'
+
+import type { WorkerData } from './types.js'
const workerFile = join(
dirname(fileURLToPath(import.meta.url)),
const workerFile = join(
dirname(fileURLToPath(import.meta.url)),
@@
-12,7
+14,7
@@
const workerFile = join(
export const smtpClientPool = new DynamicThreadPool<
WorkerData,
SMTPTransport.SentMessageInfo
export const smtpClientPool = new DynamicThreadPool<
WorkerData,
SMTPTransport.SentMessageInfo
->(
1
, availableParallelism(), workerFile, {
+>(
0
, availableParallelism(), workerFile, {
enableTasksQueue: true,
tasksQueueOptions: {
concurrency: 8
enableTasksQueue: true,
tasksQueueOptions: {
concurrency: 8