refactor: cleanup dead code
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 29 Apr 2024 11:00:11 +0000 (13:00 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 29 Apr 2024 11:00:11 +0000 (13:00 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
src/pools/worker-node.ts
src/pools/worker.ts

index a2878d8980e4c300a7dc0712c7fbbbe971868f27..99f4ab2006734ce5fce3a82df59a436115c3fc7a 100644 (file)
@@ -121,12 +121,6 @@ export class WorkerNode<Worker extends IWorker, Data = unknown>
     return this.tasksQueue.size >= this.tasksQueueBackPressureSize
   }
 
-  /** @inheritdoc */
-  public resetUsage (): void {
-    this.usage = this.initWorkerUsage()
-    this.taskFunctionsUsage.clear()
-  }
-
   /** @inheritdoc */
   public async terminate (): Promise<void> {
     const waitWorkerExit = new Promise<void>(resolve => {
index ac6718fb33c9bdfa065967e4a7da112d42e47888..ffe92e0cbaac75b7b041e5cf1c632f826450aed1 100644 (file)
@@ -346,10 +346,6 @@ export interface IWorkerNode<Worker extends IWorker, Data = unknown>
    * @returns `true` if the worker node has back pressure, `false` otherwise.
    */
   readonly hasBackPressure: () => boolean
-  /**
-   * Resets usage statistics.
-   */
-  readonly resetUsage: () => void
   /**
    * Terminates the worker node.
    */