Merge dependabot/npm_and_yarn/examples/typescript/http-server-pool/fastify-worker_thr...
[poolifier.git] / tests / worker-files / thread / longRunningWorkerHardBehavior.js
1 'use strict'
2 const { ThreadWorker, KillBehaviors } = require('../../../lib')
3 const { sleepTaskFunction } = require('../../test-utils')
4
5 async function sleep (data) {
6 return sleepTaskFunction(data, 50000)
7 }
8
9 module.exports = new ThreadWorker(sleep, {
10 killBehavior: KillBehaviors.HARD,
11 maxInactiveTime: 500
12 })