client-run-queue
    Preparing search index...

    Class RunQueue

    Index

    Constructors

    Properties

    continuousWorkMaxEntries: number

    The maximum number of entries that can be processed in a single run iteration.

    continuousWorkTimeLimitMSec: number

    The amount of time that can be used for processing in a single run iteration.

    id: string

    A technical but human-readable ID for this queue

    maxParallel: number

    The maximum number of entries that can be executed at once.

    Methods

    • Cancels all outstanding cancelable entries

      Returns void

    • Gets the total queue length, which may include canceled entries that haven't been purged yet and delayed entries that aren't yet ready for execution

      Returns number

    • Schedules a new entry to be run.

      Type Parameters

      • T

      Parameters

      • priority: number

        Lower number is higher priority

      • id: string

        A technical but human-readable ID of the entry

      • run: () => T | Promise<T>

        The function to run

      • options: RunQueueScheduleOptions = {}

        Options to effect the processing of this entry

      Returns RunQueueEntry<T>

      An entry reference, which can be used to cancel the entry, check its status, or to get the promised value.