Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Repeat

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 Repeat

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

  • Returns a promise that resolves to a redis client. Normally used only by subclasses.

    Returns Promise<RedisClient>

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

    Returns string

Methods

  • addNextRepeatableJob<T, R, N>(name: N, data: T, opts: JobsOptions, skipCheckExists?: boolean): Promise<Job<T, R, N>>
  • Type parameters

    • T = any

    • R = any

    • N: string = string

    Parameters

    • name: N
    • data: T
    • opts: JobsOptions
    • Optional skipCheckExists: boolean

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

  • close(): Promise<void>
  • 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

  • getRepeatableCount(): Promise<number>
  • getRepeatableJobs(start?: number, end?: number, asc?: boolean): Promise<{ cron: string; endDate: number; id: string; key: string; name: string; next: number; tz: string }[]>
  • Parameters

    • start: number = 0
    • end: number = -1
    • asc: boolean = false

    Returns Promise<{ cron: string; endDate: number; id: string; key: string; name: string; next: number; tz: string }[]>

  • removeRepeatable(name: string, repeat: RepeatOptions, jobId?: string): Promise<number>
  • removeRepeatableByKey(repeatJobKey: string): Promise<number>

Generated using TypeDoc