Options
All
  • Public
  • Public/Protected
  • All
Menu

Class 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

Index

Constructors

  • Parameters

    • name: string

      The name of the queue.

    • opts: QueueBaseOptions = {}

      Options for the queue.

    • Connection: typeof RedisConnection = RedisConnection

      An optional "Connection" class used to instantiate a Connection. This is useful for testing with mockups and/or extending the Connection class and passing an alternate implementation.

    Returns QueueBase

Properties

closing: Promise<void>
keys: KeysMap
name: string
opts: QueueBaseOptions = {}
toKey: (type: string) => string

Type declaration

    • (type: string): 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

  • close(): Promise<void>
  • Returns Promise<void>

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

  • disconnect(): Promise<void>
  • emit(event: string | symbol, ...args: any[]): boolean
  • Emits an event. Normally used by subclasses to emit events.

    Parameters

    • event: string | symbol

      The emitted event.

    • Rest ...args: any[]

    Returns boolean

Generated using TypeDoc