Merge dependabot/npm_and_yarn/typescript-eslint/parser-6.7.5 into combined-prs-branch
[poolifier.git] / tests / worker-files / cluster / asyncErrorWorker.js
1 'use strict'
2 const { ClusterWorker, KillBehaviors } = require('../../../lib')
3 const { sleepTaskFunction } = require('../../test-utils.js')
4
5 async function error (data) {
6 return sleepTaskFunction(
7 data,
8 2000,
9 true,
10 'Error Message from ClusterWorker:async'
11 )
12 }
13
14 module.exports = new ClusterWorker(error, {
15 killBehavior: KillBehaviors.HARD,
16 maxInactiveTime: 500
17 })