build(deps-dev): apply updates
[poolifier.git] / tests / worker-files / cluster / asyncErrorWorker.cjs
1 'use strict'
2 const { ClusterWorker, KillBehaviors } = require('../../../lib/index.cjs')
3 const { sleepTaskFunction } = require('../../test-utils.cjs')
4
5 /**
6 *
7 * @param data
8 */
9 async function error (data) {
10 return sleepTaskFunction(
11 data,
12 2000,
13 true,
14 'Error Message from ClusterWorker:async'
15 )
16 }
17
18 module.exports = new ClusterWorker(error, {
19 killBehavior: KillBehaviors.HARD,
20 maxInactiveTime: 500,
21 })