proper worker type

deepsource-autofix-76c6eb20
Dan Gowans 2023-03-28 10:42:25 -04:00
parent b735d4ae21
commit ed9137e382
1 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,8 @@
import '../helpers/polyfills.js' import '../helpers/polyfills.js'
import cluster from 'node:cluster' import cluster from 'node:cluster'
import type { Worker } from 'node:cluster'
import os from 'node:os' import os from 'node:os'
import { dirname } from 'node:path' import { dirname } from 'node:path'
import { fileURLToPath } from 'node:url' import { fileURLToPath } from 'node:url'
@ -37,7 +39,7 @@ const clusterSettings = {
cluster.setupPrimary(clusterSettings) cluster.setupPrimary(clusterSettings)
const activeWorkers = new Map<number, any>() const activeWorkers = new Map<number, Worker>()
for (let index = 0; index < processCount; index += 1) { for (let index = 0; index < processCount; index += 1) {
const worker = cluster.fork() const worker = cluster.fork()