Class BaseRetryAbstract

An abstract base class for retry logic. This abstract class keeps track of things like the total time spent in the retry loop, the number of retry attempts made, and the start time of the job so that derivative classes can implement their own retry logic based on these figures.

Hierarchy (view full)

Constructors

Properties

Methods

Constructors

Properties

jobs: {
    [id: string]: InternalJobData;
} = {}

A map of job ids to data about the job

Type declaration

config: {
    maxRetryMs: number;
}

Type declaration

  • maxRetryMs: number

Methods

  • Run a job, retrying on failure according to the logic of the concrete class used.

    Parameters

    • job: (() => Promise<boolean>)
        • (): Promise<boolean>
        • Returns Promise<boolean>

    • log: SimpleLoggerInterface
    • Optional _jobId: string

    Returns Promise<boolean>

Generated using TypeDoc