Commit | Line | Data |
---|---|---|
7784f548 | 1 | 'use strict' |
cdace0e5 | 2 | const { ClusterWorker, KillBehaviors } = require('../../../lib') |
dbca3be9 | 3 | const { sleepTaskFunction } = require('../../test-utils') |
7784f548 | 4 | |
5 | async function sleep (data) { | |
dbca3be9 | 6 | return sleepTaskFunction(data, 2000) |
7784f548 | 7 | } |
8 | ||
4c35177b | 9 | module.exports = new ClusterWorker(sleep, { |
10 | maxInactiveTime: 500, | |
1a81f8af | 11 | killBehavior: KillBehaviors.HARD |
4c35177b | 12 | }) |