mindee
    Preparing search index...

    Interface PollingOptions

    Parameters for the internal polling loop in enqueueAndGetInference().

    Default behavior:

    • initialDelaySec = 2
    • delaySec = 1.5
    • maxRetries = 80

    Validation rules:

    • initialDelaySec >= 1
    • delaySec >= 1
    • maxRetries >= 2

    The initialTimerOptions and recurringTimerOptions objects let you pass an AbortSignal or make the timer ref-ed to the setTimeout().

    const pollingOptions = {
    initialDelaySec: 4,
    delaySec: 2,
    maxRetries: 50
    };

    const inference = await client.enqueueAndGetInference(
    inputDoc, params, pollingOptions
    );
    interface PollingOptions {
        delaySec: number;
        initialDelaySec: number;
        initialTimerOptions?: TimerOptions;
        maxRetries: number;
        recurringTimerOptions?: TimerOptions;
        toString(): string;
        validateOptions(): void;
    }
    Index

    Properties

    delaySec: number

    Interval in seconds between two consecutive polls.

    initialDelaySec: number

    Number of seconds to wait before the first poll.

    initialTimerOptions?: TimerOptions

    Options passed to the initial setTimeout().

    maxRetries: number

    Maximum number of polling attempts (including the first one).

    recurringTimerOptions?: TimerOptions

    Options passed to every recurring setTimeout().

    Methods