Commit | Line | Data |
---|---|---|
325f50bc | 1 | 'use strict' |
d35e5717 JB |
2 | const { ClusterWorker, KillBehaviors } = require('../../../lib/index.cjs') |
3 | const { executeTaskFunction } = require('../../test-utils.cjs') | |
4 | const { TaskFunctions } = require('../../test-types.cjs') | |
325f50bc | 5 | |
3a502712 JB |
6 | /** |
7 | * | |
8 | * @param data | |
9 | */ | |
325f50bc | 10 | function test (data) { |
6db75ad9 | 11 | data = data || {} |
dbca3be9 JB |
12 | data.function = data.function || TaskFunctions.jsonIntegerSerialization |
13 | return executeTaskFunction(data) | |
325f50bc S |
14 | } |
15 | ||
4c35177b | 16 | module.exports = new ClusterWorker(test, { |
cca3bb1a | 17 | killBehavior: KillBehaviors.HARD, |
3a502712 | 18 | maxInactiveTime: 500, |
4c35177b | 19 | }) |