build(deps-dev): bump @types/node
[poolifier.git] / tests / worker-files / cluster / testMultipleTaskFunctionsWorker.cjs
CommitLineData
70a4f5ea 1'use strict'
d35e5717 2const { ClusterWorker, KillBehaviors } = require('../../../lib/index.cjs')
70a4f5ea
JB
3const {
4 jsonIntegerSerialization,
5 factorial,
6 fibonacci
d35e5717 7} = require('../../test-utils.cjs')
70a4f5ea
JB
8
9module.exports = new ClusterWorker(
10 {
041dc05b
JB
11 jsonIntegerSerialization: data => jsonIntegerSerialization(data.n),
12 factorial: data => factorial(data.n),
13 fibonacci: data => fibonacci(data.n)
70a4f5ea
JB
14 },
15 {
cca3bb1a
JB
16 killBehavior: KillBehaviors.HARD,
17 maxInactiveTime: 500
70a4f5ea
JB
18 }
19)