Class JobScheduler

QueueBase

Description

Base class for all classes that need to interact with queues. This class is normally not used directly, but extended by the other classes.

Hierarchy (view full)

Constructors

Properties

closing: Promise<void>
keys: KeysMap
name: string

The name of the queue.

opts: QueueBaseOptions = ...

Options for the queue.

qualifiedName: string
toKey: ((type) => string)

Type declaration

    • (type): string
    • Parameters

      • type: string

      Returns string

Accessors

  • get redisVersion(): string
  • Returns the version of the Redis instance the client is connected to,

    Returns string

Methods

  • Closes the connection and returns a promise that resolves when the connection is closed.

    Returns Promise<void>

  • Emits an event. Normally used by subclasses to emit events.

    Parameters

    • event: string | symbol

      The emitted event.

    • Rest ...args: any[]

    Returns boolean

  • Parameters

    • jobSchedulerId: string

    Returns Promise<number>

  • Wraps the code with telemetry and provides a span for configuration.

    Type Parameters

    • T

    Parameters

    • spanKind: SpanKind

      kind of the span: Producer, Consumer, Internal

    • operation: string

      operation name (such as add, process, etc)

    • destination: string

      destination name (normally the queue name)

    • callback: ((span?, dstPropagationMetadata?) => T | Promise<T>)

      code to wrap with telemetry

        • (span?, dstPropagationMetadata?): T | Promise<T>
        • Parameters

          • Optional span: Span<any>
          • Optional dstPropagationMetadata: string

          Returns T | Promise<T>

    • Optional srcPropagationMetadata: string

    Returns Promise<T | Promise<T>>

  • Type Parameters

    • T = any
    • R = any
    • N extends string = string

    Parameters

    • jobSchedulerId: string
    • repeatOpts: Omit<RepeatOptions, "offset" | "key" | "prevMillis">
    • jobName: N
    • jobData: T
    • opts: Omit<JobsOptions, "repeat" | "jobId" | "delay">
    • __namedParameters: {
          override: boolean;
      }
      • override: boolean

    Returns Promise<Job<T, R, N>>

Generated using TypeDoc