enableTasksQueue ? 'with' : 'without'
} tasks queue`,
async () => {
- pool.setWorkerChoiceStrategy(workerChoiceStrategy, {
- measurement
- })
- pool.enableTasksQueue(enableTasksQueue)
- strictEqual(
- pool.opts.workerChoiceStrategy,
- workerChoiceStrategy
- )
- strictEqual(pool.opts.enableTasksQueue, enableTasksQueue)
- strictEqual(
- pool.opts.workerChoiceStrategyOptions.measurement,
- measurement
- )
await runPoolifierPool(pool, {
taskExecutions,
workerData
})
+ },
+ {
+ onStart: () => {
+ pool.setWorkerChoiceStrategy(workerChoiceStrategy, {
+ measurement
+ })
+ pool.enableTasksQueue(enableTasksQueue)
+ strictEqual(
+ pool.opts.workerChoiceStrategy,
+ workerChoiceStrategy
+ )
+ strictEqual(pool.opts.enableTasksQueue, enableTasksQueue)
+ strictEqual(
+ pool.opts.workerChoiceStrategyOptions.measurement,
+ measurement
+ )
+ }
}
)
}
enableTasksQueue ? 'with' : 'without'
} tasks queue`,
async () => {
- pool.setWorkerChoiceStrategy(workerChoiceStrategy)
- pool.enableTasksQueue(enableTasksQueue)
- strictEqual(
- pool.opts.workerChoiceStrategy,
- workerChoiceStrategy
- )
- strictEqual(pool.opts.enableTasksQueue, enableTasksQueue)
await runPoolifierPool(pool, {
taskExecutions,
workerData
})
+ },
+ {
+ onStart: () => {
+ pool.setWorkerChoiceStrategy(workerChoiceStrategy)
+ pool.enableTasksQueue(enableTasksQueue)
+ strictEqual(
+ pool.opts.workerChoiceStrategy,
+ workerChoiceStrategy
+ )
+ strictEqual(pool.opts.enableTasksQueue, enableTasksQueue)
+ }
}
)
}