Commit | Line | Data |
---|---|---|
325f50bc | 1 | 'use strict' |
1a81f8af | 2 | const { ClusterWorker, KillBehaviors } = require('../../../lib/index') |
15d56315 | 3 | const TestUtils = require('../../test-utils') |
325f50bc S |
4 | |
5 | async function error (data) { | |
6db75ad9 | 6 | return TestUtils.sleepWorkerFunction( |
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, { | |
15 | maxInactiveTime: 500, | |
4c35177b | 16 | async: true, |
1a81f8af | 17 | killBehavior: KillBehaviors.HARD |
325f50bc | 18 | }) |