-import type { Worker } from 'cluster'
+import type { ClusterSettings, Worker } from 'cluster'
import cluster from 'cluster'
import type { MessageValue } from '../../utility-types'
import { AbstractPool } from '../abstract-pool'
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
env?: any
+ /**
+ * Cluster settings.
+ *
+ * @see https://nodejs.org/api/cluster.html#cluster_cluster_settings
+ */
+ settings?: ClusterSettings
}
/**
/** @inheritDoc */
protected setupHook (): void {
- cluster.setupPrimary({
- exec: this.filePath
- })
+ cluster.setupPrimary({ ...this.opts.settings, exec: this.filePath })
}
/** @inheritDoc */