InferenceAI

Enter at least two characters to search.

Start free

Exponential Backoff Schedule

mediumProduction AI10 min25 XP

Return retries delay values starting at base, doubling after every retry, and never exceeding cap.

Examples

EXAMPLE WALKTHROUGHuncapped

A guided view of the published example, not a trace of your code.

INPUT[1,4,10]
TASKbackoff_delays()
EXPECTED OUTPUT[1,2,4,8]

Start with the input values shown in this example.

Example 1 of 2

Input: base = 1, retries = 4, cap = 10

Output: [1,2,4,8]

Explanation: uncapped

Input: base = 2, retries = 5, cap = 10

Output: [2,4,8,10,10]

Explanation: capped

Hint 1

Use min for the cap.

Topics

ReliabilityAPIsPython