-const numberOfWorkers = 10
-const pool = new FixedClusterPool(
- numberOfWorkers,
- './tests/worker-files/cluster/testWorker.js',
- {
- errorHandler: e => console.error(e)
- }
-)
-const emptyPool = new FixedClusterPool(
- 1,
- './tests/worker-files/cluster/emptyWorker.js',
- { exitHandler: () => console.log('empty pool worker exited') }
-)
-const echoPool = new FixedClusterPool(
- 1,
- './tests/worker-files/cluster/echoWorker.js'
-)
-const errorPool = new FixedClusterPool(
- 1,
- './tests/worker-files/cluster/errorWorker.js',
- {
- errorHandler: e => console.error(e)
- }
-)
-const asyncErrorPool = new FixedClusterPool(
- 1,
- './tests/worker-files/cluster/asyncErrorWorker.js',
- {
- onlineHandler: () => console.log('worker is online')
- }
-)
-const asyncPool = new FixedClusterPool(
- 1,
- './tests/worker-files/cluster/asyncWorker.js'
-)