.execute({
port: 8080,
workerFile: requestHandlerWorkerFile,
- maxWorkers: Math.round(availableParallelism() / 4),
+ maxWorkers:
+ Math.round(availableParallelism() / 4) < 1
+ ? 1
+ : Math.round(availableParallelism() / 4),
enableTasksQueue: true,
tasksQueueOptions: {
concurrency: 8
console.error('Thread worker error', e)
}
})
- .then((response) => {
+ .then(response => {
if (response.status) {
console.info(
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
}
return null
})
- .catch((error) => {
+ .catch(error => {
console.error('Fastify failed to start in cluster worker:', error)
})
},