collect-your-stuff
    Preparing search index...

    Class Queueable

    Queueable represents a runnable entry in a queue.

    Implements

    Index
    • Create a queueable item that can be used in a queue.

      Parameters

      • queueableData: { next?: Queueable; ready?: boolean | Function; task?: any } = {}

        The settings for the new queueable.

        • Optionalnext?: Queueable

          The reference to the next queueable if any

        • Optionalready?: boolean | Function

          Indicate if the queueable is ready to run

        • Optionaltask?: any

          The data to be stored in this queueable

      Returns Queueable

    classType: typeof Queueable

    The class used to create this instance, so that it can be recognized as valid without an instanceof check.

    complete: boolean = false

    Whether this queueable has been run to completion.

    data: any = null

    The task (or data) this queueable holds.

    next: Queueable = null

    The queueable after this one, or null when this is the last.

    ready: boolean | Function = false

    Whether this queueable may run, or a function which answers that when asked.

    running: boolean = false

    Whether this queueable is running right now.

    • Set this queueable as completed.

      Parameters

      • completeResponse: { context?: any; error?: any; success?: any } = {}

        The result to report for the task.

        • Optionalcontext?: any

          Provide additional data in the response

        • Optionalerror?: any

          Indicate a task was error-free (use false) or give an error message

        • Optionalsuccess?: any

          Indicate when the task failed (use false) or give a success message

      Returns completeResponse

    • Convert an array into Queueable instances, return the head and tail Queueables.

      Parameters

      • values: any[] = []

        Provide an array of data that will be converted to a chain of queueable linkers.

      • classType: any = Queueable

        Provide the type of IsLinker to use.

      Returns { head: IsLinker; tail: IsLinker }

    • Make a new Queueable from the data given if it is not already a valid Queueable.

      Parameters

      • queueable: any

        Return a valid Queueable instance from given data, or even an already valid one.

      • classType: any = Queueable

        Provide the type of IsLinker to use.

      Returns IsLinker