batch-cluster
    Preparing search index...

    Interface BatchClusterEvents

    This interface describes the BatchCluster's event names as fields. The type of the field describes the event data payload.

    See BatchClusterEmitter for more details.

    interface BatchClusterEvents {
        beforeEnd: () => void;
        childEnd: (childProcess: BatchProcess, reason: ChildEndReason) => void;
        childStart: (childProcess: BatchProcess) => void;
        end: () => void;
        endError: (error: Error, proc?: BatchProcess) => void;
        fatalError: (error: Error) => void;
        healthCheckError: (error: Error, proc: BatchProcess) => void;
        internalError: (error: Error) => void;
        noTaskData: (
            stdoutData: null | string | Buffer<ArrayBufferLike>,
            stderrData: null | string | Buffer<ArrayBufferLike>,
            proc: BatchProcess,
        ) => void;
        startError: (error: Error, childProcess?: BatchProcess) => void;
        taskData: (
            data: string | Buffer<ArrayBufferLike>,
            task: undefined | Task<unknown>,
            proc: BatchProcess,
        ) => void;
        taskError: (error: Error, task: Task<unknown>, proc: BatchProcess) => void;
        taskResolved: (task: Task<unknown>, proc: BatchProcess) => void;
        taskTimeout: (
            timeoutMs: number,
            task: Task<unknown>,
            proc: BatchProcess,
        ) => void;
    }
    Index

    Properties

    beforeEnd: () => void

    Emitted when this instance is in the process of ending.

    childEnd: (childProcess: BatchProcess, reason: ChildEndReason) => void

    Emitted when a child process has ended

    childStart: (childProcess: BatchProcess) => void

    Emitted when a child process has started

    end: () => void

    Emitted when this instance has ended. No child processes should remain at this point.

    endError: (error: Error, proc?: BatchProcess) => void

    Emitted when a child process has an error during shutdown

    fatalError: (error: Error) => void

    Emitted when .end() is called because the error rate has exceeded BatchClusterOptions.maxReasonableProcessFailuresPerMinute

    healthCheckError: (error: Error, proc: BatchProcess) => void

    Emitted when a process fails health checks

    internalError: (error: Error) => void

    Emitted when an internal consistency check fails

    noTaskData: (
        stdoutData: null | string | Buffer<ArrayBufferLike>,
        stderrData: null | string | Buffer<ArrayBufferLike>,
        proc: BatchProcess,
    ) => void

    Emitted when child processes write to stdout or stderr without a current task

    startError: (error: Error, childProcess?: BatchProcess) => void

    Emitted when a child process fails to spin up and run the BatchProcessOptions.versionCommand successfully within BatchClusterOptions.spawnTimeoutMillis.

    Type declaration

    taskData: (
        data: string | Buffer<ArrayBufferLike>,
        task: undefined | Task<unknown>,
        proc: BatchProcess,
    ) => void

    Emitted when tasks receive data, which may be partial chunks from the task stream.

    taskError: (error: Error, task: Task<unknown>, proc: BatchProcess) => void

    Emitted when a task has an error

    taskResolved: (task: Task<unknown>, proc: BatchProcess) => void

    Emitted when a task has been resolved

    taskTimeout: (
        timeoutMs: number,
        task: Task<unknown>,
        proc: BatchProcess,
    ) => void

    Emitted when a task times out. Note that a taskError event always succeeds these events.