build(deps-dev): bump @types/node
[poolifier.git] / tests / worker-files / cluster / testWorker.cjs
1 'use strict'
2 const { ClusterWorker, KillBehaviors } = require('../../../lib/index.cjs')
3 const { executeTaskFunction } = require('../../test-utils.cjs')
4 const { TaskFunctions } = require('../../test-types.cjs')
5
6 function test (data) {
7 data = data || {}
8 data.function = data.function || TaskFunctions.jsonIntegerSerialization
9 return executeTaskFunction(data)
10 }
11
12 module.exports = new ClusterWorker(test, {
13 killBehavior: KillBehaviors.HARD,
14 maxInactiveTime: 500
15 })