refactor: split TestUtils class into arrow functions
[poolifier.git] / tests / worker-files / cluster / asyncWorker.js
CommitLineData
7784f548 1'use strict'
cdace0e5 2const { ClusterWorker, KillBehaviors } = require('../../../lib')
bac873bd 3const { sleepWorkerFunction } = require('../../test-utils')
7784f548 4
5async function sleep (data) {
bac873bd 6 return sleepWorkerFunction(data, 2000)
7784f548 7}
8
4c35177b 9module.exports = new ClusterWorker(sleep, {
10 maxInactiveTime: 500,
1a81f8af 11 killBehavior: KillBehaviors.HARD
4c35177b 12})