@camunda8/orchestration-cluster-api
    Preparing search index...

    Interface ThreadedJobWorker

    A job worker that runs handler logic in a shared pool of worker_threads, keeping the main Node.js event loop free for polling and I/O.

    The thread pool is owned by CamundaClient and shared across all threaded workers. Each thread is generic — the handler module path is sent with each job, and threads cache loaded handlers by module path.

    interface ThreadedJobWorker {
        get activeJobs(): number;
        get busyThreads(): number;
        get name(): string;
        get poolSize(): number;
        get ready(): Promise<void>;
        get stopped(): boolean;
        start(): void;
        stop(): void;
        stopGracefully(
            opts?: { checkIntervalMs?: number; waitUpToMs?: number },
        ): Promise<{ remainingJobs: number; timedOut: boolean }>;
    }
    Index

    Accessors

    Methods

    • Parameters

      • Optionalopts: { checkIntervalMs?: number; waitUpToMs?: number }

      Returns Promise<{ remainingJobs: number; timedOut: boolean }>