Merge pull request #2281 from poolifier/combined-prs-branch
[poolifier.git] / tests / worker-files / cluster / asyncWorker.cjs
CommitLineData
7784f548 1'use strict'
d35e5717
JB
2const { ClusterWorker, KillBehaviors } = require('../../../lib/index.cjs')
3const { sleepTaskFunction } = require('../../test-utils.cjs')
7784f548 4
5async function sleep (data) {
dbca3be9 6 return sleepTaskFunction(data, 2000)
7784f548 7}
8
4c35177b 9module.exports = new ClusterWorker(sleep, {
cca3bb1a
JB
10 killBehavior: KillBehaviors.HARD,
11 maxInactiveTime: 500
4c35177b 12})