build(deps-dev): apply updates
[poolifier.git] / tests / worker-files / cluster / testWorker.cjs
CommitLineData
325f50bc 1'use strict'
d35e5717
JB
2const { ClusterWorker, KillBehaviors } = require('../../../lib/index.cjs')
3const { executeTaskFunction } = require('../../test-utils.cjs')
4const { TaskFunctions } = require('../../test-types.cjs')
325f50bc 5
3a502712
JB
6/**
7 *
8 * @param data
9 */
325f50bc 10function test (data) {
6db75ad9 11 data = data || {}
dbca3be9
JB
12 data.function = data.function || TaskFunctions.jsonIntegerSerialization
13 return executeTaskFunction(data)
325f50bc
S
14}
15
4c35177b 16module.exports = new ClusterWorker(test, {
cca3bb1a 17 killBehavior: KillBehaviors.HARD,
3a502712 18 maxInactiveTime: 500,
4c35177b 19})