This class is used to represent queues of jobs waiting to be executed.

Hierarchy

  • RedisStore
    • JobQueue

Constructors

Properties

client: RedisClientType
credentialManager: CredentialManager = ...
name: string

Methods

  • Returns Promise<void>

  • Private

    Gets a job by the jobId. Also populates the job's credentials.

    Parameters

    • id: string

      jobId

    Returns Promise<null | Job>

    job with the given jobId

  • Returns whether the queue is empty.

    Returns Promise<boolean>

    true if empty; false otherwise

  • Returns the length of the redis queue.

    Returns Promise<number>

    length

  • Returns the job at the front of the queue without mutating the queue.

    Returns Promise<null | Job>

    the job at the front or undefined if empty

  • Shifts everything in the queue forwards and pops out the job at the front.

    Returns Promise<null | Job>

    the popped out job

  • Pushes a job onto the queue.

    Parameters

    • item: Job

      the job to push

    Returns Promise<void>

Generated using TypeDoc