Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
enableTasksQueue ? 'with' : 'without'
} tasks queue`,
async () => {
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
})
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 () => {
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
})
await runPoolifierPool(pool, {
taskExecutions,
workerData
})
+ },
+ {
+ onStart: () => {
+ pool.setWorkerChoiceStrategy(workerChoiceStrategy)
+ pool.enableTasksQueue(enableTasksQueue)
+ strictEqual(
+ pool.opts.workerChoiceStrategy,
+ workerChoiceStrategy
+ )
+ strictEqual(pool.opts.enableTasksQueue, enableTasksQueue)
+ }