Function nextAttemptAt

  • Backoff: 5 s, 10 s, 20 s ... up to an hour between attempts, dead a day after the first attempt.

    Parameters

    • attempts: number

      The failed attempts so far, the one just recorded included.

    • now: number

      When that failure was recorded, in milliseconds.

    Returns number

    When the next attempt is due.