build(deps-dev): apply updates
[poolifier.git] / tests / worker-files / cluster / testTaskFunctionObjectsWorker.cjs
CommitLineData
8139fbbc 1'use strict'
fcfc3353 2const { KillBehaviors, ClusterWorker } = require('../../../lib/index.cjs')
8139fbbc
JB
3const {
4 factorial,
5 fibonacci,
3a502712 6 jsonIntegerSerialization,
8139fbbc
JB
7} = require('../../test-utils.cjs')
8
fcfc3353 9module.exports = new ClusterWorker(
8139fbbc
JB
10 {
11 jsonIntegerSerialization: {
3a502712 12 taskFunction: data => jsonIntegerSerialization(data.n),
8139fbbc
JB
13 },
14 factorial: { taskFunction: data => factorial(data.n) },
3a502712 15 fibonacci: { taskFunction: data => fibonacci(data.n), priority: -5 },
8139fbbc
JB
16 },
17 {
18 killBehavior: KillBehaviors.HARD,
3a502712 19 maxInactiveTime: 500,
8139fbbc
JB
20 }
21)