[]previous and next page

WorkerInfo

What workerInfo reports.

What workerInfo reports.

Import#

ts
import type { WorkerInfo } from "@shadow-js/dusk/node";

Signature#

ts
interface WorkerInfo {
  /** True in a worker started by `serve({ workers })` or `dusk start --workers`; false in a single process. */
  readonly clustered: boolean;
  /** The worker's id (1, 2, ...; a replacement gets a new id), or `undefined` in a single process. */
  readonly id: number | undefined;
  /** How many workers the server runs: 1 in a single process. */
  readonly count: number;
  /** The id of this process. */
  readonly pid: number;
}

Members#

Name Type Description
clustered readonly clustered: boolean True in a worker started by serve({ workers }) or dusk start --workers; false in a single process.
id readonly id: number | undefined The worker's id (1, 2, ...; a replacement gets a new id), or undefined in a single process.
count readonly count: number How many workers the server runs: 1 in a single process.
pid readonly pid: number The id of this process.