refactor: silence jsdoc linting warnings
[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 /**
7 *
8 * @param data
9 * @returns
10 */
11 function test (data) {
12 data = data || {}
13 data.function = data.function || TaskFunctions.jsonIntegerSerialization
14 return executeTaskFunction(data)
15 }
16
17 module.exports = new ClusterWorker(test, {
18 killBehavior: KillBehaviors.HARD,
19 maxInactiveTime: 500,
20 })