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

    Interface JobWorker

    interface JobWorker {
        get activeJobs(): number;
        get name(): string;
        get stopped(): boolean;
        start(): void;
        stop(): void;
        stopGracefully(
            opts?: { checkIntervalMs?: number; waitUpToMs?: number },
        ): Promise<{ remainingJobs: number; timedOut: boolean }>;
    }
    Index
    • Begin polling for jobs. Safe to call at any point: the request is buffered until the transport is ready, and redundant calls (including an explicit call on an autoStart worker) are dropped rather than starting a second poll loop. Once the worker is stopped, start() is a no-op.

      Returns void

    • Gracefully stop the worker: prevent new polls, allow any in-flight activation to finish without cancellation, and wait for currently active jobs to drain (be acknowledged) up to waitUpToMs. If timeout is reached, falls back to hard stop logic (cancels activation if still pending).

      Parameters

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

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