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
I searched existing ideas and did not find a similar one
I added a very descriptive title
I've clearly described the feature request and motivation for it
Feature request
Add a minTimeout option to AsyncCaller so the amount of time between retries can be controlled.
Motivation
In my current scenario, when hitting a rate limit, I know that if I wait ~1-2 minutes the rate limit will be resolved. I want to set the retry attempt time to be 15 seconds, so no matter what it always hits 2 minutes (with some room for safety). Currently, it defaults to 1 second. Setting the max retries to, say, 15, feels a bit wasteful.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Checked
Feature request
Add a
minTimeout
option toAsyncCaller
so the amount of time between retries can be controlled.Motivation
In my current scenario, when hitting a rate limit, I know that if I wait ~1-2 minutes the rate limit will be resolved. I want to set the retry attempt time to be 15 seconds, so no matter what it always hits 2 minutes (with some room for safety). Currently, it defaults to 1 second. Setting the max retries to, say, 15, feels a bit wasteful.
Proposal (If applicable)
p-retry lets you pass in
minTimeout
, which it then passes to the retry package, where it lets you set "the number of milliseconds before starting the first retry." https://github.com/tim-kos/node-retry#retryoperationoptionsPassing
minTimeout
down the same wayonFailedAttempt
andretries
are passed down would be the easiest way to implement this, I think.Beta Was this translation helpful? Give feedback.
All reactions