refactor: cleanup promise usage code
[poolifier.git] / tests / worker-files / cluster / testMultipleTaskFunctionsWorker.js
1 'use strict'
2 const { ClusterWorker, KillBehaviors } = require('../../../lib')
3 const {
4 jsonIntegerSerialization,
5 factorial,
6 fibonacci
7 } = require('../../test-utils')
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 maxInactiveTime: 500,
17 killBehavior: KillBehaviors.HARD
18 }
19 )