build(ci): refine autofix GH action
[poolifier.git] / src / pools / cluster / fixed.ts
index 1fea176c4f3884c1ce4778f891d059d9f48bbbde..bf61cd477b153af111d835a0371d193d92ceb786 100644 (file)
@@ -1,4 +1,5 @@
 import cluster, { type Worker } from 'node:cluster'
+
 import type { MessageValue } from '../../utility-types.js'
 import { AbstractPool } from '../abstract-pool.js'
 import { type PoolOptions, type PoolType, PoolTypes } from '../pool.js'
@@ -11,7 +12,6 @@ export type ClusterPoolOptions = PoolOptions<Worker>
 
 /**
  * A cluster pool with a fixed number of workers.
- *
  * @typeParam Data - Type of data sent to the worker. This can only be structured-cloneable data.
  * @typeParam Response - Type of execution response. This can only be structured-cloneable data.
  * @author [Christopher Quadflieg](https://github.com/Shinigami92)
@@ -23,10 +23,10 @@ export class FixedClusterPool<
 > extends AbstractPool<Worker, Data, Response> {
   /**
    * Constructs a new poolifier fixed cluster pool.
-   *
    * @param numberOfWorkers - Number of workers for this pool.
    * @param filePath - Path to an implementation of a `ClusterWorker` file, which can be relative or absolute.
    * @param opts - Options for this fixed cluster pool.
+   * @param maximumNumberOfWorkers - The maximum number of workers for this pool.
    */
   public constructor (
     numberOfWorkers: number,
@@ -54,14 +54,14 @@ export class FixedClusterPool<
   ): void {
     this.workerNodes[workerNodeKey]?.worker.send({
       ...message,
-      workerId: this.getWorkerInfo(workerNodeKey)?.id
+      workerId: this.getWorkerInfo(workerNodeKey)?.id,
     } satisfies MessageValue<Data>)
   }
 
   /** @inheritDoc */
   protected sendStartupMessageToWorker (workerNodeKey: number): void {
     this.sendToWorker(workerNodeKey, {
-      ready: false
+      ready: false,
     })
   }