refactor: silence jsdoc linting warnings
[poolifier.git] / tests / worker-files / cluster / asyncErrorWorker.cjs
1 'use strict'
2 const { ClusterWorker, KillBehaviors } = require('../../../lib/index.cjs')
3 const { sleepTaskFunction } = require('../../test-utils.cjs')
4
5 /**
6 *
7 * @param data
8 * @returns
9 */
10 async function error (data) {
11 return sleepTaskFunction(
12 data,
13 2000,
14 true,
15 'Error Message from ClusterWorker:async'
16 )
17 }
18
19 module.exports = new ClusterWorker(error, {
20 killBehavior: KillBehaviors.HARD,
21 maxInactiveTime: 500,
22 })