kaven-basic - v6.0.0
    Preparing search index...

    Function DoUntilSuccess

    • Repeatedly executes an asynchronous action until it succeeds or the maximum number of retries is reached.

      Parameters

      • action: () => Promise<boolean>

        An asynchronous function that returns a boolean indicating success (true) or failure (false).

      • retryDelayInMillionSeconds: number = 500

        The delay in milliseconds between retries. Defaults to 500 ms.

      • retryCount: number = 5

        The maximum number of retry attempts. Defaults to 5.

      • startImmediately: boolean = false

        If true, the action is executed immediately before any delay. Defaults to false.

      Returns Promise<boolean>

      A promise that resolves to true if the action succeeds within the allowed attempts, or false otherwise.

      • The action will be executed at least once.
      • If the function returns "false", the actual execution count should be 1 + retryCount

      1.1.5

      2025-07-10