Interface IJobRun<T>

Canonical async-operation handle. Methods are intentionally narrow so downstream tickets that submit jobs (operator workflows, manifest apply, etc.) can speak one vocabulary across protocols.

interface IJobRun<T> {
    id: string;
    progress: undefined | JobProgress;
    status: JobStatus;
    type: string;
    cancel(): Promise<JobStatus>;
    poll(): Promise<JobSnapshot<T>>;
    results(options?: JobResultsOptions): Promise<JobResult<T>>;
    watch(listener: JobSnapshotListener<T>): (() => void);
}

Type Parameters

  • T = unknown

Implemented by

Properties

id: string

Stable identifier assigned by the server when the job was accepted.

progress: undefined | JobProgress

Last-observed progress, if the server reported any.

status: JobStatus

Last-observed status. Backed by the most recent poll() / status() / watch() snapshot; reads are synchronous.

type: string

Process / operation identifier, e.g. an OGC processId.

Methods

  • Wait for the job to reach a terminal state and resolve with the outputs. Rejects with HonuaJobFailedError for failed / dismissed terminal states, or HonuaJobPollTimeoutError when the optional JobResultsOptions deadline / attempt cap is reached or the supplied signal aborts. Implementations poll on a configurable interval (capped exponential backoff); the default cadence is left to the adapter.

    Parameters

    Returns Promise<JobResult<T>>