Commit | Line | Data |
---|---|---|
1 | 'use strict' | |
2 | const { ClusterWorker, KillBehaviors } = require('../../../lib/index.cjs') | |
3 | const { sleepTaskFunction } = require('../../test-utils.cjs') | |
4 | ||
5 | /** | |
6 | * | |
7 | * @param data | |
8 | * @returns | |
9 | */ | |
10 | async function sleep (data) { | |
11 | return sleepTaskFunction(data, 50000) | |
12 | } | |
13 | ||
14 | module.exports = new ClusterWorker(sleep, { | |
15 | killBehavior: KillBehaviors.HARD, | |
16 | maxInactiveTime: 500, | |
17 | }) |