Commit | Line | Data |
---|---|---|
4c35177b | 1 | 'use strict' |
e8ea58d2 | 2 | const { ClusterWorker, killBehaviorTypes } = require('../../../lib/index') |
4c35177b | 3 | |
4 | async function sleep (data) { | |
5 | return new Promise((resolve, reject) => { | |
6 | setTimeout(() => resolve(data), 50000) | |
7 | }) | |
8 | } | |
9 | ||
10 | module.exports = new ClusterWorker(sleep, { | |
11 | maxInactiveTime: 500, | |
12 | async: true, | |
e8ea58d2 | 13 | killBehavior: killBehaviorTypes.HARD |
4c35177b | 14 | }) |