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
ed20267e 9 * @returns
3a502712 10 */
325f50bc 11function test (data) {
6db75ad9 12 data = data || {}
dbca3be9
JB
13 data.function = data.function || TaskFunctions.jsonIntegerSerialization
14 return executeTaskFunction(data)
325f50bc
S
15}
16
4c35177b 17module.exports = new ClusterWorker(test, {
cca3bb1a 18 killBehavior: KillBehaviors.HARD,
3a502712 19 maxInactiveTime: 500,
4c35177b 20})