UNPKG

nestjs-resilience

Version:

A module for improving the reliability and fault-tolerance of your NestJS applications

15 lines (14 loc) 435 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.LinearBackoff = void 0; const base_backoff_1 = require("./base.backoff"); class LinearBackoff extends base_backoff_1.Backoff { *getGenerator(maxRetries) { let attempt = 0; while (attempt < maxRetries) { yield this.baseDelay * attempt; attempt += 1; } } } exports.LinearBackoff = LinearBackoff;