Class TaskHandler<Result, Binded>Abstract

Represents the task handler

Type Parameters

  • Result
  • Binded

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

Methods

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

    Parameters

    Returns this

  • Cancel the task

    Parameters

    Returns void

  • Execute the task

    Returns Promise<Result>

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

    Parameters

    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

    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

    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

    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

    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

    Returns this