Constructors

  • Parameters

    • id: string

      A technical but human-readable ID for this queue

    • options: RunQueueOptions = {}

      Options for customizing the behavior of the queue

    Returns RunQueue

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

        • (): T | Promise<T>
        • Returns T | Promise<T>

    • 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.

Generated using TypeDoc