Interface IMongoQueueStorageOptions

Options for a (new) MongoQueueStorage instance.

interface IMongoQueueStorageOptions {
    getDb: (() => Db | PromiseLike<Db>);
    getLogger?: Nilable<(() => ILogger)>;
    getSystemName?: Nilable<(() => any)>;
    setImmediate?: Nilable<SetImmediateFunc>;
    setTimeout?: Nilable<SetTimeoutFunc>;
    taskCollectionName?: Nilable<string>;
    waitBeforeRetry?: Nilable<number>;
}

Properties

getDb: (() => Db | PromiseLike<Db>)

Type declaration

    • (): Db | PromiseLike<Db>
    • A function, returning the Mongo database.

      Returns Db | PromiseLike<Db>

      The instance or the promise with it.

getLogger?: Nilable<(() => ILogger)>

A function, returning a custom logger.

Type declaration

Returns

The logger to ise.

getSystemName?: Nilable<(() => any)>

A custom function, returning the name of the system.

Type declaration

    • (): any
    • Returns any

Returns

A value representing the name of the system.

setImmediate?: Nilable<SetImmediateFunc>

Custom setImmediate function.

setTimeout?: Nilable<SetTimeoutFunc>

Custom setTimeout function.

taskCollectionName?: Nilable<string>

The custom name of the collection for the tasks. Default: queueTasks

waitBeforeRetry?: Nilable<number>

The custom time in milliseconds to wait, before a failed task is done to be executed. Default: 10000

Generated using TypeDoc