build(deps-dev): apply updates
[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
3a502712
JB
5/**
6 *
7 * @param data
5993cfc5 8 * @returns
3a502712 9 */
7784f548 10async function sleep (data) {
dbca3be9 11 return sleepTaskFunction(data, 2000)
7784f548 12}
13
4c35177b 14module.exports = new ClusterWorker(sleep, {
cca3bb1a 15 killBehavior: KillBehaviors.HARD,
3a502712 16 maxInactiveTime: 500,
4c35177b 17})