build(ci): test TS configuration support in sonar cloud action
[poolifier.git] / tests / worker-files / cluster / asyncErrorWorker.js
CommitLineData
325f50bc 1'use strict'
cdace0e5 2const { ClusterWorker, KillBehaviors } = require('../../../lib')
dbca3be9 3const { sleepTaskFunction } = require('../../test-utils')
325f50bc
S
4
5async function error (data) {
dbca3be9 6 return sleepTaskFunction(
15d56315
JB
7 data,
8 2000,
9 true,
10 'Error Message from ClusterWorker:async'
11 )
325f50bc
S
12}
13
14module.exports = new ClusterWorker(error, {
15 maxInactiveTime: 500,
1a81f8af 16 killBehavior: KillBehaviors.HARD
325f50bc 17})