Class Sequence<T, U>

Represents the task handler

Type Parameters

  • T
  • U

Hierarchy (View Summary)

Constructors

Properties

createdAt: Date

Date when the task was created

priority: number

Task priority

taskId: string

Task identifier, defined by the user

uuid: string

Unique task identification, unique for each task

weight: number

Task weight

Accessors

  • get metadata(): MetaData
  • Return the metadata of the task

    Returns MetaData

Methods

  • Register an event listener over the done event, which is emitted when a task has ended, either due to completion or failure.

    Parameters

    • event: "done"

      done event

    • listener: DoneListener<T>

      Done event handler

    Returns this

  • Removes the specified listener from the listener array for the done event.

    Parameters

    • event: "done"

      done event

    • listener: DoneListener<T>

      Done event handler

    Returns this

  • Register an event listener over the done event, which is emitted when a task has ended, either due to completion or failure.

    Parameters

    • event: "done"

      done event

    • listener: DoneListener<T>

      Done event handler

    Returns this

  • Registers a one-time event listener over the done event, which is emitted when a task has ended, either due to completion or failure.

    Parameters

    • event: "done"

      done event

    • listener: DoneListener<T>

      Done event handler

    Returns this

  • Registers a event listener over the done event, at the beginning of the listeners array, which is emitted when a task has ended, either due to completion or failure.

    Parameters

    • event: "done"

      done event

    • listener: DoneListener<T>

      Done event handler

    Returns this

  • Registers a one-time event listener over the done event, at the beginning of the listeners array, which is emitted when a task has ended, either due to completion or failure.

    Parameters

    • event: "done"

      done event

    • listener: DoneListener<T>

      Done event handler

    Returns this

  • Removes all listeners, or those of the specified event.

    Parameters

    • Optionalevent: "done"

      done event

    Returns this

  • Removes the specified listener from the listener array for the done event.

    Parameters

    • event: "done"

      done event

    • listener: DoneListener<T>

      Done event handler

    Returns this