Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BatchProcess

BatchProcess manages the care and feeding of a single child process.

Hierarchy

  • BatchProcess

Index

Constructors

constructor

Properties

name

name: string

observer

opts

proc

proc: ChildProcess

start

start: number = Date.now()

Accessors

exited

  • get exited(): boolean

exitedPromise

  • get exitedPromise(): Promise<void>

idle

  • get idle(): boolean

pid

  • get pid(): number

ready

  • get ready(): boolean

taskCount

  • get taskCount(): number

Methods

end

  • end(gracefully?: boolean, source: string): Promise<void>
  • End this child process.

    Parameters

    • Default value gracefully: boolean = true

      Wait for any current task to be resolved or rejected before shutting down the child process.

    • source: string

      who called end() (used for logging)

    Returns Promise<void>

    Promise that will be resolved when the process has completed. Subsequent calls to end() will ignore the parameters and return the first endPromise.

ended

  • ended(): Promise<boolean>
  • Returns Promise<boolean>

    true if this.end() has been requested or the child process has exited.

execTask

  • execTask(task: Task<any>): boolean

notEnded

  • notEnded(): Promise<boolean>

notRunning

  • notRunning(): Promise<boolean>

running

  • running(): Promise<boolean>
  • Returns Promise<boolean>

    true if the child process is in the process table

Generated using TypeDoc