@mikeyt23/node-cli-utils
    Preparing search index...

    Function withRetryAsync

    • Call a function until it succeeds. Will stop after the number of calls specified by maxCalls param, or forever if -1 is passed.

      Parameters

      • func: () => Promise<void>

        The function to call

      • maxCalls: number

        The maximum number of times to call the function before giving up. Pass -1 to retry forever.

      • delayMilliseconds: number

        The number of milliseconds to wait between calls

      • Optionaloptions: Partial<WithRetryOptions>

        Options for controlling the behavior of the retry. See WithRetryOptions.

      Returns Promise<void>