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