Commit | Line | Data |
---|---|---|
70a4f5ea | 1 | 'use strict' |
70a4f5ea JB |
2 | const { ClusterWorker, KillBehaviors } = require('../../../lib') |
3 | const { | |
4 | jsonIntegerSerialization, | |
5 | factorial, | |
6 | fibonacci | |
2eb14889 | 7 | } = require('../../test-utils.js') |
70a4f5ea JB |
8 | |
9 | module.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 | ) |