Commit | Line | Data |
---|---|---|
325f50bc | 1 | 'use strict' |
d35e5717 JB |
2 | const { ClusterWorker, KillBehaviors } = require('../../../lib/index.cjs') |
3 | const { sleepTaskFunction } = require('../../test-utils.cjs') | |
325f50bc S |
4 | |
5 | async 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 | ||
14 | module.exports = new ClusterWorker(error, { | |
cca3bb1a JB |
15 | killBehavior: KillBehaviors.HARD, |
16 | maxInactiveTime: 500 | |
325f50bc | 17 | }) |