Merge pull request #2281 from poolifier/combined-prs-branch
[poolifier.git] / tests / worker-files / cluster / testMultipleTaskFunctionsWorker.cjs
1 'use strict'
2 const { ClusterWorker, KillBehaviors } = require('../../../lib/index.cjs')
3 const {
4 jsonIntegerSerialization,
5 factorial,
6 fibonacci
7 } = require('../../test-utils.cjs')
8
9 module.exports = new ClusterWorker(
10 {
11 jsonIntegerSerialization: data => jsonIntegerSerialization(data.n),
12 factorial: data => factorial(data.n),
13 fibonacci: data => fibonacci(data.n)
14 },
15 {
16 killBehavior: KillBehaviors.HARD,
17 maxInactiveTime: 500
18 }
19 )