+ const numberOfWorkers = 6
+ const pool = new FixedClusterPool(
+ numberOfWorkers,
+ './tests/worker-files/cluster/testWorker.js',
+ {
+ errorHandler: e => console.error(e)
+ }
+ )
+ const queuePool = new FixedClusterPool(
+ numberOfWorkers,
+ './tests/worker-files/cluster/testWorker.js',
+ {
+ enableTasksQueue: true,
+ tasksQueueOptions: {
+ concurrency: 2
+ },
+ errorHandler: e => console.error(e)
+ }
+ )
+ const emptyPool = new FixedClusterPool(
+ numberOfWorkers,
+ './tests/worker-files/cluster/emptyWorker.js',
+ { exitHandler: () => console.log('empty pool worker exited') }
+ )
+ const echoPool = new FixedClusterPool(
+ numberOfWorkers,
+ './tests/worker-files/cluster/echoWorker.js'
+ )
+ const errorPool = new FixedClusterPool(
+ numberOfWorkers,
+ './tests/worker-files/cluster/errorWorker.js',
+ {
+ errorHandler: e => console.error(e)
+ }
+ )
+ const asyncErrorPool = new FixedClusterPool(
+ numberOfWorkers,
+ './tests/worker-files/cluster/asyncErrorWorker.js',
+ {
+ errorHandler: e => console.error(e)
+ }
+ )
+ const asyncPool = new FixedClusterPool(
+ numberOfWorkers,
+ './tests/worker-files/cluster/asyncWorker.js'
+ )
+