Commit 32d7e3cb authored by nanahira's avatar nanahira

fix

parent b9ab979a
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.retry = retry;
async function retry(fn, count, delayFn = (attempt) => Math.pow(2, attempt) * 1000) {
async function retry(fn, count, delayFn = (attempt) => Math.pow(2, attempt) * 100) {
let lastError;
for (let attempt = 0; attempt < count; attempt++) {
try {
......
export async function retry<T>(
fn: () => Promise<T>,
count: number,
delayFn: (attempt: number) => number = (attempt) => Math.pow(2, attempt) * 1000
delayFn: (attempt: number) => number = (attempt) => Math.pow(2, attempt) * 100
): Promise<T> {
let lastError: any;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment