refactor: split TestUtils class into arrow functions
[poolifier.git] / tests / worker-files / cluster / asyncErrorWorker.js
... / ...
CommitLineData
1'use strict'
2const { ClusterWorker, KillBehaviors } = require('../../../lib')
3const { sleepWorkerFunction } = require('../../test-utils')
4
5async function error (data) {
6 return sleepWorkerFunction(
7 data,
8 2000,
9 true,
10 'Error Message from ClusterWorker:async'
11 )
12}
13
14module.exports = new ClusterWorker(error, {
15 maxInactiveTime: 500,
16 killBehavior: KillBehaviors.HARD
17})