You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example: the function invoked by backoff makes HTTP requests, and the server responds with a 429 ("retry after") status code.
We want the Operation function to be able to return an error which indicates that the next backoff should not happen before the given delay.
For example, assume that the next backoff is in 1s, but the server responds with a "Retry-After" indicating a 5s delay. The handler should return a special kind of error (for example, MinBackoffError, similar to PermanentError) that indicates that the next attempt should not happen in less than 5s.
The backoff library will then pick the maximum of the 2 (1s and 5s) and use that as the next backoff.
I am happy to submit a PR if you think you would be interested in this!
The text was updated successfully, but these errors were encountered:
Example: the function invoked by backoff makes HTTP requests, and the server responds with a 429 ("retry after") status code.
We want the Operation function to be able to return an error which indicates that the next backoff should not happen before the given delay.
For example, assume that the next backoff is in 1s, but the server responds with a "Retry-After" indicating a 5s delay. The handler should return a special kind of error (for example,
MinBackoffError
, similar toPermanentError
) that indicates that the next attempt should not happen in less than 5s.The backoff library will then pick the maximum of the 2 (1s and 5s) and use that as the next backoff.
I am happy to submit a PR if you think you would be interested in this!
The text was updated successfully, but these errors were encountered: