Options
All
  • Public
  • Public/Protected
  • All
Menu

The TaskManager is the common component responsible for managing running tasks.

Hierarchy

  • TaskManager

Implements

Index

Constructors

Properties

deleteEmitter: Emitter<number> = ...

Emit when a registered task is deleted.

id: number = -1

each task has this unique task id, for this back-end

logger: ILogger
tasks: Map<number, Task> = ...

contains all running tasks

tasksPerCtx: Map<string, Task[]> = ...

contains running tasks per context

Accessors

  • get onDelete(): Event<number>

Methods

  • delete(task: Task): void
  • get(id: number): undefined | Task
  • getTasks(ctx?: string): undefined | Task[]
  • Returns all running tasks. If a context is provided, filter-down to only tasks started from that context.

    Parameters

    • Optional ctx: string

      the task execution context.

    Returns undefined | Task[]

    all running tasks for the given context or undefined if no tasks are registered for the given context.

  • onStop(): void
  • register(task: Task, ctx?: string): number